Skip to content

Commit

Permalink
SortableJS#1492: Improved repaint trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-m1 authored and elo7-developer committed Nov 18, 2019
1 parent da70e9c commit 50dfc0a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ define('sortable', [], function sortableFactory() {
ghostRelativeParent,
ghostRelativeParentInitialScroll = [], // (left, top)


forRepaintDummy,
realDragElRect, // dragEl rect after current animation

/** @const */
Expand Down Expand Up @@ -1398,7 +1396,7 @@ define('sortable', [], function sortableFactory() {
+ (prevRect.top - currentRect.top) / (scaleY ? scaleY : 1) + 'px,0)'
);

forRepaintDummy = target.offsetWidth; // repaint
this._repaint(target);
_css(target, 'transition', 'transform ' + ms + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
_css(target, 'transform', 'translate3d(0,0,0)');
}
Expand All @@ -1412,6 +1410,10 @@ define('sortable', [], function sortableFactory() {
}
},

_repaint: function(target) {
return target.offsetWidth;
},

_offMoveEvents: function() {
_off(document, 'touchmove', this._onTouchMove);
_off(document, 'pointermove', this._onTouchMove);
Expand Down Expand Up @@ -1571,7 +1573,6 @@ define('sortable', [], function sortableFactory() {
lastTarget =
lastDirection =

forRepaintDummy =
realDragElRect =

putSortable =
Expand Down

0 comments on commit 50dfc0a

Please sign in to comment.