source: trip-planner-front/node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
2import * as tslib_1 from "tslib";
3import { AsyncAction } from './AsyncAction';
4var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
5 tslib_1.__extends(AnimationFrameAction, _super);
6 function AnimationFrameAction(scheduler, work) {
7 var _this = _super.call(this, scheduler, work) || this;
8 _this.scheduler = scheduler;
9 _this.work = work;
10 return _this;
11 }
12 AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
13 if (delay === void 0) {
14 delay = 0;
15 }
16 if (delay !== null && delay > 0) {
17 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
18 }
19 scheduler.actions.push(this);
20 return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
21 };
22 AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
23 if (delay === void 0) {
24 delay = 0;
25 }
26 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
27 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
28 }
29 if (scheduler.actions.length === 0) {
30 cancelAnimationFrame(id);
31 scheduler.scheduled = undefined;
32 }
33 return undefined;
34 };
35 return AnimationFrameAction;
36}(AsyncAction));
37export { AnimationFrameAction };
38//# sourceMappingURL=AnimationFrameAction.js.map
Note: See TracBrowser for help on using the repository browser.