UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

52 lines (51 loc) 2.06 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, markType } from "igniteui-react-core"; import { IExecutionContext_$type } from "igniteui-react-core"; import { truncate } from "igniteui-react-core"; import { dateNow } from "igniteui-react-core"; import { timeSpanTotalMilliseconds } from "igniteui-react-core"; /** * @hidden */ export let BrowserExecutionContext = /*@__PURE__*/ (() => { class BrowserExecutionContext extends Base { get requestAnimationFrame() { return this._requestAnimationFrame; } set requestAnimationFrame(a) { this._requestAnimationFrame = a; } constructor(a) { super(); this.b = new Date(); this._requestAnimationFrame = null; if (a != null) { this.requestAnimationFrame = a.getRequestAnimationFrame(); } this.b = dateNow(); } enqueueAction(a) { window.setTimeout(() => a(), 0); } enqueueAnimationAction(a) { this.requestAnimationFrame(() => a()); } execute(a) { window.setTimeout(() => a(), 0); } executeDelayed(a, b) { window.setTimeout(() => a(), b); } getCurrentRelativeTime() { let a = dateNow(); return truncate(timeSpanTotalMilliseconds((+a - +(this.b)))); } } BrowserExecutionContext.$t = /*@__PURE__*/ markType(BrowserExecutionContext, 'BrowserExecutionContext', Base.$, [IExecutionContext_$type]); return BrowserExecutionContext; })();