File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ const DrawArea: FunctionComponent<IDrawArea> = ({
5454
5555 const newArea : IgnoreArea = {
5656 id : Date . now ( ) . toString ( ) ,
57- x : ( e . evt . layerX - stageOffset . x ) / stageScale ,
58- y : ( e . evt . layerY - stageOffset . y ) / stageScale ,
57+ x : Math . round ( ( e . evt . layerX - stageOffset . x ) / stageScale ) ,
58+ y : Math . round ( ( e . evt . layerY - stageOffset . y ) / stageScale ) ,
5959 width : MIN_RECT_SIDE_PIXEL ,
6060 height : MIN_RECT_SIDE_PIXEL ,
6161 } ;
@@ -82,8 +82,8 @@ const DrawArea: FunctionComponent<IDrawArea> = ({
8282 const newShapesList = ignoreAreas . map ( ( i ) => {
8383 if ( i . id === selectedRectId ) {
8484 // new width and height
85- i . width = Math . max ( mouseX - i . x , MIN_RECT_SIDE_PIXEL ) ;
86- i . height = Math . max ( mouseY - i . y , MIN_RECT_SIDE_PIXEL ) ;
85+ i . width = Math . max ( Math . round ( mouseX - i . x ) , MIN_RECT_SIDE_PIXEL ) ;
86+ i . height = Math . max ( Math . round ( mouseY - i . y ) , MIN_RECT_SIDE_PIXEL ) ;
8787 return i ;
8888 }
8989 return i ;
You can’t perform that action at this time.
0 commit comments