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 8787 const convertedP2 = scanner . convertToClientCoordinates ( p2 ) ;
8888 mask = document . createElement ( "div" ) ;
8989 mask . style . position = "fixed" ;
90- mask . style . left = convertedP1 . x + "px" ;
91- mask . style . top = convertedP1 . y + "px" ;
92- mask . style . width = convertedP2 . x - convertedP1 . x + "px" ;
93- mask . style . height = convertedP2 . y - convertedP1 . y + "px" ;
90+ mask . style . left = Math . min ( convertedP1 . x , convertedP2 . x ) + "px" ;
91+ mask . style . top = Math . min ( convertedP1 . y , convertedP2 . y ) + "px" ;
92+ mask . style . width = Math . abs ( convertedP2 . x - convertedP1 . x ) + "px" ;
93+ mask . style . height = Math . abs ( convertedP2 . y - convertedP1 . y ) + "px" ;
9494 mask . style . border = "2px dashed red" ;
9595 document . body . append ( mask ) ;
9696 highlightResultMasks . push ( mask ) ;
You can’t perform that action at this time.
0 commit comments