Skip to content

Commit

Permalink
#1492: Improved repaint trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-m1 committed Apr 19, 2019
1 parent aef7af6 commit 7244a67
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 @@ -76,8 +76,6 @@
ghostRelativeParent,
ghostRelativeParentInitialScroll = [], // (left, top)


forRepaintDummy,
realDragElRect, // dragEl rect after current animation

/** @const */
Expand Down Expand Up @@ -1408,7 +1406,7 @@
+ (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 @@ -1422,6 +1420,10 @@
}
},

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

_offMoveEvents: function() {
_off(document, 'touchmove', this._onTouchMove);
_off(document, 'pointermove', this._onTouchMove);
Expand Down Expand Up @@ -1581,7 +1583,6 @@
lastTarget =
lastDirection =

forRepaintDummy =
realDragElRect =

putSortable =
Expand Down

0 comments on commit 7244a67

Please sign in to comment.