UNPKG

vscroll

Version:
30 lines 1.03 kB
import { __extends } from "tslib"; import { BaseAdapterProcessFactory, AdapterProcess, ProcessStatus } from '../misc/index'; var Pause = /** @class */ (function (_super) { __extends(Pause, _super); function Pause() { return _super !== null && _super.apply(this, arguments) || this; } Pause.run = function (scroller, options) { var resume = !!(options === null || options === void 0 ? void 0 : options.resume); // pause branch if (!resume && !scroller.state.paused.get()) { scroller.logger.log('pause scroller'); scroller.state.paused.set(true); scroller.workflow.call({ process: AdapterProcess.pause, status: ProcessStatus.done }); return; } scroller.logger.log('resume scroller'); scroller.state.paused.set(false); scroller.workflow.call({ process: AdapterProcess.pause, status: ProcessStatus.next }); }; return Pause; }(BaseAdapterProcessFactory(AdapterProcess.pause))); export default Pause; //# sourceMappingURL=pause.js.map