File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -301,8 +301,7 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
301
301
this . dragOffset = this . _getDragOffset ( this . lastDrag , n . el , this . helperContainment ) ;
302
302
this . helper . style . width = this . dragOffset . width + 'px' ;
303
303
this . helper . style . height = this . dragOffset . height + 'px' ;
304
- function swap ( o : unknown , a : string , b : string ) : void { const tmp = o [ a ] ; o [ a ] = o [ b ] ; o [ b ] = tmp ; }
305
- swap ( n . _orig , 'w' , 'h' ) ;
304
+ Utils . swap ( n . _orig , 'w' , 'h' ) ;
306
305
delete n . _rect ;
307
306
this . _mouseMove ( this . lastDrag ) ;
308
307
}
Original file line number Diff line number Diff line change @@ -589,6 +589,9 @@ export class Utils {
589
589
}
590
590
}
591
591
592
+ /** swap the given object 2 field values */
593
+ public static swap ( o : unknown , a : string , b : string ) : void { const tmp = o [ a ] ; o [ a ] = o [ b ] ; o [ b ] = tmp ; }
594
+
592
595
/** returns true if event is inside the given element rectangle */
593
596
// Note: Safari Mac has null event.relatedTarget which causes #1684 so check if DragEvent is inside the coordinates instead
594
597
// this.el.contains(event.relatedTarget as HTMLElement)
You can’t perform that action at this time.
0 commit comments