Skip to content

Commit 7244a67

Browse files
committed
#1492: Improved repaint trigger
1 parent aef7af6 commit 7244a67

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Sortable.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@
7676
ghostRelativeParent,
7777
ghostRelativeParentInitialScroll = [], // (left, top)
7878

79-
80-
forRepaintDummy,
8179
realDragElRect, // dragEl rect after current animation
8280

8381
/** @const */
@@ -1408,7 +1406,7 @@
14081406
+ (prevRect.top - currentRect.top) / (scaleY ? scaleY : 1) + 'px,0)'
14091407
);
14101408

1411-
forRepaintDummy = target.offsetWidth; // repaint
1409+
this._repaint(target);
14121410
_css(target, 'transition', 'transform ' + ms + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
14131411
_css(target, 'transform', 'translate3d(0,0,0)');
14141412
}
@@ -1422,6 +1420,10 @@
14221420
}
14231421
},
14241422

1423+
_repaint: function(target) {
1424+
return target.offsetWidth;
1425+
},
1426+
14251427
_offMoveEvents: function() {
14261428
_off(document, 'touchmove', this._onTouchMove);
14271429
_off(document, 'pointermove', this._onTouchMove);
@@ -1581,7 +1583,6 @@
15811583
lastTarget =
15821584
lastDirection =
15831585

1584-
forRepaintDummy =
15851586
realDragElRect =
15861587

15871588
putSortable =

0 commit comments

Comments
 (0)