File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -1260,6 +1260,8 @@ const Board = React.forwardRef<BoardActions, BoardProps>(
12601260 loadItems ,
12611261 scaleRatio ,
12621262 isInDrawingMode ,
1263+ imageSize . width ,
1264+ imageSize . height ,
12631265 ] ) ;
12641266
12651267 // Update zoom parent value
Original file line number Diff line number Diff line change @@ -83,21 +83,7 @@ export const toScaledCoord = ({
8383 */
8484export const pointsInCanvas = ( obj ?: fabricTypes . CustomObject ) => {
8585 if ( ! obj ) return [ ] ;
86- if ( ! obj . points ) {
87- return obj . getCoords ( true ) ;
88- }
89- return (
90- obj . points ?. map ( ( p ) => {
91- const matrix = obj . calcOwnMatrix ( ) ;
92- const minX = Math . min ( ...obj . points ! . map ( ( _p ) => _p . x ) ) ;
93- const minY = Math . min ( ...obj . points ! . map ( ( _p ) => _p . y ) ) ;
94- const tmpPoint = new fabric . Point (
95- p . x - minX - obj . width ! / 2 ,
96- p . y - minY - obj . height ! / 2 ,
97- ) ;
98- return fabric . util . transformPoint ( tmpPoint , matrix ) ;
99- } ) ?? [ ]
100- ) ;
86+ return obj . getCoords ( true ) ;
10187} ;
10288
10389/**
You can’t perform that action at this time.
0 commit comments