@@ -82,7 +82,7 @@ const CanvasComponent: React.FC<CanvasComponentProps> = ({ state, width, height
8282
8383 // 添加步骤描述背景和文本 - 新增内容
8484 const stepDesc = state . timeline [ state . currentStep ] ?. description || "" ;
85- const stepBackground = stepDescGroup . append ( 'rect' )
85+ stepDescGroup . append ( 'rect' )
8686 . attr ( 'x' , 0 )
8787 . attr ( 'y' , 10 )
8888 . attr ( 'width' , dimensions . width )
@@ -238,7 +238,7 @@ const CanvasComponent: React.FC<CanvasComponentProps> = ({ state, width, height
238238
239239 // 渲染公式 - 增强显示
240240 if ( state . formula ) {
241- const formulaBackground = formulaGroup . append ( 'rect' )
241+ formulaGroup . append ( 'rect' )
242242 . attr ( 'x' , innerWidth - 220 )
243243 . attr ( 'y' , - 20 )
244244 . attr ( 'width' , 200 )
@@ -274,7 +274,7 @@ const CanvasComponent: React.FC<CanvasComponentProps> = ({ state, width, height
274274
275275 // 渲染矩阵(仅当使用矩阵算法时)
276276 if ( state . currentAlgorithm === 'matrix' && state . matrix . length > 0 ) {
277- renderMatrix ( g , state . matrix , innerWidth , innerHeight ) ;
277+ renderMatrix ( g , state . matrix , innerWidth ) ;
278278 }
279279
280280 } , [ state . staircase , state . currentAlgorithm , state . formula , state . matrix , dimensions , state . currentStep , state . timeline , state . totalSteps ] ) ;
@@ -317,8 +317,7 @@ const CanvasComponent: React.FC<CanvasComponentProps> = ({ state, width, height
317317 const renderMatrix = (
318318 g : d3 . Selection < SVGGElement , unknown , null , undefined > ,
319319 matrix : number [ ] [ ] ,
320- width : number ,
321- height : number
320+ width : number
322321 ) => {
323322 const matrixGroup = g . append ( 'g' )
324323 . attr ( 'class' , 'matrix' )
0 commit comments