igniteui-react-core
Version:
Ignite UI React Core.
88 lines (87 loc) • 3.22 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends, __values } from "tslib";
import { Base, Number_$type, Delegate_$type, fromEnum, runOn, markType } from "./type";
import { ITickProvider_$type } from "./ITickProvider";
import { List$1 } from "./List$1";
import { Dictionary$2 } from "./Dictionary$2";
/**
* @hidden
*/
var AnimationBrowserTickProvider = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(AnimationBrowserTickProvider, _super);
function AnimationBrowserTickProvider(a) {
var _this = _super.call(this) || this;
_this.e = 0;
_this.c = null;
_this._requestAnimationFrame = null;
_this.d = new List$1(Delegate_$type, 0);
_this.b = false;
_this.requestAnimationFrame = a.getRequestAnimationFrame();
_this.c = new Dictionary$2(Number_$type, Delegate_$type, 0);
return _this;
}
Object.defineProperty(AnimationBrowserTickProvider.prototype, "requestAnimationFrame", {
get: function () {
return this._requestAnimationFrame;
},
set: function (a) {
this._requestAnimationFrame = a;
},
enumerable: false,
configurable: true
});
AnimationBrowserTickProvider.prototype.f = function () {
var e_1, _a;
this.b = false;
this.d.clear();
try {
for (var _b = __values(fromEnum(this.c.values)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
this.d.add(a);
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
for (var b = 0; b < this.d.count; b++) {
this.d._inner[b]();
}
this.d.clear();
};
AnimationBrowserTickProvider.prototype.setupTicking = function (a) {
var b = this.e;
this.e++;
this.c.item(b, a);
return b;
};
AnimationBrowserTickProvider.prototype.requestFrame = function (a) {
if (this.b) {
return;
}
this.b = true;
this.requestAnimationFrame(runOn(this, this.f));
};
AnimationBrowserTickProvider.prototype.teardownTicking = function (a) {
if (this.c.containsKey(a)) {
this.c.removeItem(a);
}
};
AnimationBrowserTickProvider.$t = markType(AnimationBrowserTickProvider, 'AnimationBrowserTickProvider', Base.$, [ITickProvider_$type]);
return AnimationBrowserTickProvider;
}(Base));
export { AnimationBrowserTickProvider };