@@ -176,7 +176,7 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
176176 /** @internal called when the main page (after successful mousedown) receives a move event to drag the item around the screen */
177177 protected _mouseMove ( e : DragEvent ) : boolean {
178178 // console.log(`${count++} move ${e.x},${e.y}`)
179- let s = this . mouseDownEvent ;
179+ const s = this . mouseDownEvent ;
180180 this . lastDrag = e ;
181181
182182 if ( this . dragging ) {
@@ -196,7 +196,7 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
196196 this . dragging = true ;
197197 DDManager . dragElement = this ;
198198 // if we're dragging an actual grid item, set the current drop as the grid (to detect enter/leave)
199- let grid = this . el . gridstackNode ?. grid ;
199+ const grid = this . el . gridstackNode ?. grid ;
200200 if ( grid ) {
201201 DDManager . dropElement = ( grid . el as DDElementHost ) . ddElement . ddDroppable ;
202202 } else {
@@ -330,16 +330,16 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
330330 /** @internal restore back the original style before dragging */
331331 protected _removeHelperStyle ( ) : DDDraggable {
332332 this . helper . classList . remove ( 'ui-draggable-dragging' ) ;
333- let node = ( this . helper as GridItemHTMLElement ) ?. gridstackNode ;
333+ const node = ( this . helper as GridItemHTMLElement ) ?. gridstackNode ;
334334 // don't bother restoring styles if we're gonna remove anyway...
335335 if ( ! node ?. _isAboutToRemove && this . dragElementOriginStyle ) {
336- let helper = this . helper ;
336+ const helper = this . helper ;
337337 // don't animate, otherwise we animate offseted when switching back to 'absolute' from 'fixed'.
338338 // TODO: this also removes resizing animation which doesn't have this issue, but others.
339339 // Ideally both would animate ('move' would immediately restore 'absolute' and adjust coordinate to match,
340340 // then trigger a delay (repaint) to restore to final dest with animate) but then we need to make sure 'resizestop'
341341 // is called AFTER 'transitionend' event is received (see https://github.com/gridstack/gridstack.js/issues/2033)
342- let transition = this . dragElementOriginStyle [ 'transition' ] || null ;
342+ const transition = this . dragElementOriginStyle [ 'transition' ] || null ;
343343 helper . style . transition = this . dragElementOriginStyle [ 'transition' ] = 'none' ; // can't be NULL #1973
344344 DDDraggable . originStyleProp . forEach ( prop => helper . style [ prop ] = this . dragElementOriginStyle [ prop ] || null ) ;
345345 setTimeout ( ( ) => helper . style . transition = transition , 50 ) ; // recover animation from saved vars after a pause (0 isn't enough #1973)
@@ -350,7 +350,7 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
350350
351351 /** @internal updates the top/left position to follow the mouse */
352352 protected _dragFollow ( e : DragEvent ) : void {
353- let containmentRect = { left : 0 , top : 0 } ;
353+ const containmentRect = { left : 0 , top : 0 } ;
354354 // if (this.helper.style.position === 'absolute') { // we use 'fixed'
355355 // const { left, top } = this.helperContainment.getBoundingClientRect();
356356 // containmentRect = { left, top };
0 commit comments