UNPKG

igniteui-react-core

Version:
135 lines (134 loc) 3.96 kB
/* 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, runOn, markType } from "./type"; import { List$1 } from "./List$1"; import { ISchedulableRender_$type } from "./ISchedulableRender"; /** * @hidden */ export let CanvasRenderScheduler = /*@__PURE__*/ (() => { class CanvasRenderScheduler extends Base { constructor() { super(); this.d = true; this.i = null; this.h = null; this.a = null; this.c = false; this.k = -1; this.j = null; this.b = false; this.e = false; this.i = new List$1(ISchedulableRender_$type, 0); this.h = new List$1(CanvasRenderScheduler.$, 0); } o(a) { this.d = true; this.i.add(a); } u(a) { this.d = true; this.i.remove(a); } s() { this.d = true; this.q(); } get g() { return this.c; } m(a) { let b = this.j; this.j = a; if (this.c && this.j != null && b == null) { this.j.setTimeout(runOn(this, this.n), 0); } } q() { if (!this.c) { this.c = true; if (this.j != null) { this.j.setTimeout(runOn(this, this.n), 0); } else { window.setTimeout(runOn(this, this.n), 0); } } } r(a, b) { this.q(); } l() { if (this.k != -1) { window.clearTimeout(this.k); this.k = -1; } if (this.c) { this.n(); } } n() { this.k = -1; if (this.c) { this.c = false; this.b = true; if (this.h.count > 0) { for (let a = 0; a < this.h.count; a++) { this.h._inner[a].l(); } } if (this.d) { this.t(); } this.p(); } } get f() { return this.b; } p() { if (this.e) { this.b = false; return; } let a = true; for (let b = 0; b < this.i.count; b++) { let c = this.i._inner[b]; c.preRender(); } for (let d = 0; d < this.i.count; d++) { let e = this.i._inner[d]; e.undirty(a); a = false; } for (let f = 0; f < this.i.count; f++) { let g = this.i._inner[f]; g.postRender(); } this.b = false; if (this.a != null) { this.a(); } } t() { this.i.aa((a, b) => { let c = a; let d = b; if (c.index < d.index) { return -1; } if (c.index > d.index) { return 1; } return 0; }); this.d = false; } } CanvasRenderScheduler.$t = /*@__PURE__*/ markType(CanvasRenderScheduler, 'CanvasRenderScheduler'); return CanvasRenderScheduler; })();