File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,8 @@ const FFT = forwardRef(
109109 const newWglPlots : WebglPlot [ ] = [ ] ;
110110
111111 linesRef . current = [ ] ;
112-
112+ const canvasWrapper = document . createElement ( "div" ) ;
113+ canvasWrapper . className = "canvas-container relative flex-[1_1_0%]" ;
113114 // Create a single canvas element
114115 const canvas = document . createElement ( "canvas" ) ;
115116 canvas . id = `canvas${ 1 } ` ;
@@ -119,9 +120,10 @@ const FFT = forwardRef(
119120
120121 const badge = document . createElement ( "div" ) ;
121122 badge . className = "absolute text-gray-500 text-sm rounded-full p-2 m-2" ;
123+ canvasWrapper . appendChild ( canvas ) ;
122124
123- container . appendChild ( badge ) ;
124- container . appendChild ( canvas ) ;
125+ canvasWrapper . appendChild ( badge ) ;
126+ container . appendChild ( canvasWrapper ) ;
125127
126128 try {
127129 const wglp = new WebglPlot ( canvas ) ;
@@ -326,7 +328,8 @@ console.log(newWglPlots)
326328 < main
327329 className = "flex flex-col flex-[1_1_0%] min-h-80 bg-highlight rounded-2xl m-4 relative"
328330 ref = { canvasContainerRef }
329- > </ main >
331+ >
332+ </ main >
330333
331334 { /* Flex container for side-by-side layout */ }
332335 < div className = "w-full flex flex-row justify-between items-center max-w-full h-[300px] gap-20" >
You can’t perform that action at this time.
0 commit comments