igniteui-react-grids
Version:
Ignite UI React grid components.
65 lines (64 loc) • 2.38 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 { Base, Number_$type, Delegate_$type, fromEnum, runOn, markType } from "igniteui-react-core";
import { ITickProvider_$type } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Dictionary$2 } from "igniteui-react-core";
/**
* @hidden
*/
export let BrowserTickProvider = /*@__PURE__*/ (() => {
class BrowserTickProvider extends Base {
get requestAnimationFrame() {
return this._requestAnimationFrame;
}
set requestAnimationFrame(a) {
this._requestAnimationFrame = a;
}
constructor(a) {
super();
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);
}
f() {
this.b = false;
this.d.clear();
for (let a of fromEnum(this.c.values)) {
this.d.add(a);
}
for (let b = 0; b < this.d.count; b++) {
this.d._inner[b]();
}
this.d.clear();
}
setupTicking(a) {
let b = this.e;
this.e++;
this.c.item(b, a);
return b;
}
requestFrame(a) {
if (this.b) {
return;
}
this.b = true;
this.requestAnimationFrame(runOn(this, this.f));
}
teardownTicking(a) {
if (this.c.containsKey(a)) {
this.c.removeItem(a);
}
}
}
BrowserTickProvider.$t = /*@__PURE__*/ markType(BrowserTickProvider, 'BrowserTickProvider', Base.$, [ITickProvider_$type]);
return BrowserTickProvider;
})();