_set: function(x) { x = clamp(x, this._minX, this._maxX); this.targets.forEach(el => { el.style.transform = 'translateX(' + x +'px)'; }); this._curX = x; },
_updateDestination: function(x, duration) { duration = duration != null ? duration : this.TRANSITION_DURATION; this._startX = this._curX; this._destX = clamp(x, this._minX, this._maxX); var now = Date.now(); this._endTime = now + duration; if (!this._requestId) { this._startTime = now; this._tween(); } },