UNPKG

vscroll

Version:
33 lines 988 B
var ScrollModel = /** @class */ (function () { function ScrollModel() { this.reset(); } ScrollModel.prototype.reset = function () { this.previous = null; this.current = null; this.syntheticPosition = null; this.syntheticFulfill = false; this.positionBeforeAsync = null; this.positionBeforeAdjust = null; this.positionAfterAdjust = null; this.stop(); }; ScrollModel.prototype.stop = function () { if (this.scrollTimer) { clearTimeout(this.scrollTimer); this.scrollTimer = null; } if (this.cancelAnimation) { this.cancelAnimation(); this.cancelAnimation = null; } }; ScrollModel.prototype.hasPositionChanged = function (position) { var before = this.positionBeforeAdjust; var after = this.positionAfterAdjust; return before === null || before !== position || after === null || after !== position; }; return ScrollModel; }()); export { ScrollModel }; //# sourceMappingURL=scroll.js.map