File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -552,12 +552,12 @@ class IntegratedComponent extends Component {
552
552
let width = maxX - minX , height = maxY - minY ;
553
553
let ratio = ( this . size - 2 * IntegratedComponent . PADDING ) / Math . max ( width , height ) ;
554
554
let realWidth = width * ratio , realHeight = height * ratio ;
555
- let startX = this . targetX + ( this . size - realWidth ) / 2 , startY = this . targetY + ( this . size - realHeight ) / 2 ;
555
+ let startX = this . x + ( this . size - realWidth ) / 2 , startY = this . y + ( this . size - realHeight ) / 2 ;
556
556
557
557
this . ledSurfaces . length = 0 ;
558
558
this . ledComponents . forEach ( component => {
559
- component . surfaces [ 0 ] . realX = startX + ( component . targetX - minX ) * ratio ;
560
- component . surfaces [ 0 ] . realY = startY + ( component . targetY - minY ) * ratio ;
559
+ component . surfaces [ 0 ] . realX = startX + ( component . x - minX ) * ratio ;
560
+ component . surfaces [ 0 ] . realY = startY + ( component . y - minY ) * ratio ;
561
561
component . surfaces [ 0 ] . realWidth = component . size * ratio ;
562
562
component . surfaces [ 0 ] . realHeight = component . size * ratio ;
563
563
this . ledSurfaces . push ( component . surfaces [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments