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 @@ -328,10 +328,10 @@ export default class PreviewView implements m.ClassComponent<PreviewViewAttrs> {
328328
329329 const onMouseMove = ( event : MouseEvent ) => {
330330 const to = point ( event ) ;
331- this . crop . top = Math . max ( 0 , Math . min ( from . y , to . y ) ) ;
332- this . crop . left = Math . max ( 0 , Math . min ( from . x , to . x ) ) ;
333- this . crop . width = Math . min ( this . recording . width - this . crop . left , Math . abs ( from . x - to . x ) ) ;
334- this . crop . height = Math . min ( this . recording . height - this . crop . top , Math . abs ( from . y - to . y ) ) ;
331+ this . crop . top = Math . floor ( Math . max ( 0 , Math . min ( from . y , to . y ) ) ) ;
332+ this . crop . left = Math . floor ( Math . max ( 0 , Math . min ( from . x , to . x ) ) ) ;
333+ this . crop . width = Math . floor ( Math . min ( this . recording . width - this . crop . left , Math . abs ( from . x - to . x ) ) ) ;
334+ this . crop . height = Math . floor ( Math . min ( this . recording . height - this . crop . top , Math . abs ( from . y - to . y ) ) ) ;
335335
336336 didMove = true ;
337337 m . redraw ( ) ;
You can’t perform that action at this time.
0 commit comments