File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 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
301301 this . dragOffset = this . _getDragOffset ( this . lastDrag , n . el , this . helperContainment ) ;
302302 this . helper . style . width = this . dragOffset . width + 'px' ;
303303 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' ) ;
306305 delete n . _rect ;
307306 this . _mouseMove ( this . lastDrag ) ;
308307 }
Original file line number Diff line number Diff line change @@ -589,6 +589,9 @@ export class Utils {
589589 }
590590 }
591591
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+
592595 /** returns true if event is inside the given element rectangle */
593596 // Note: Safari Mac has null event.relatedTarget which causes #1684 so check if DragEvent is inside the coordinates instead
594597 // this.el.contains(event.relatedTarget as HTMLElement)
You can’t perform that action at this time.
0 commit comments