+{"ast":null,"code":"\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.AnimationFrameAction = void 0;\nvar AsyncAction_1 = require(\"./AsyncAction\");\nvar animationFrameProvider_1 = require(\"./animationFrameProvider\");\nvar AnimationFrameAction = function (_super) {\n __extends(AnimationFrameAction, _super);\n function AnimationFrameAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function () {\n return scheduler.flush(undefined);\n }));\n };\n AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n var _a;\n if (delay === void 0) {\n delay = 0;\n }\n if (delay != null ? delay > 0 : this.delay > 0) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n var actions = scheduler.actions;\n if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id);\n scheduler._scheduled = undefined;\n }\n return undefined;\n };\n return AnimationFrameAction;\n}(AsyncAction_1.AsyncAction);\nexports.AnimationFrameAction = AnimationFrameAction;\n//# sourceMappingURL=AnimationFrameAction.js.map","map":null,"metadata":{},"sourceType":"script","externalDependencies":[]}
0 commit comments