UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

58 lines (57 loc) 2.54 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 { __extends } from "tslib"; 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 */ var BrowserExecutionContext = /** @class */ /*@__PURE__*/ (function (_super) { __extends(BrowserExecutionContext, _super); function BrowserExecutionContext(a) { var _this = _super.call(this) || this; _this.b = new Date(); _this._requestAnimationFrame = null; if (a != null) { _this.requestAnimationFrame = a.getRequestAnimationFrame(); } _this.b = dateNow(); return _this; } Object.defineProperty(BrowserExecutionContext.prototype, "requestAnimationFrame", { get: function () { return this._requestAnimationFrame; }, set: function (a) { this._requestAnimationFrame = a; }, enumerable: false, configurable: true }); BrowserExecutionContext.prototype.enqueueAction = function (a) { window.setTimeout(function () { return a(); }, 0); }; BrowserExecutionContext.prototype.enqueueAnimationAction = function (a) { this.requestAnimationFrame(function () { return a(); }); }; BrowserExecutionContext.prototype.execute = function (a) { window.setTimeout(function () { return a(); }, 0); }; BrowserExecutionContext.prototype.executeDelayed = function (a, b) { window.setTimeout(function () { return a(); }, b); }; BrowserExecutionContext.prototype.getCurrentRelativeTime = function () { var a = dateNow(); return truncate(timeSpanTotalMilliseconds((+a - +(this.b)))); }; BrowserExecutionContext.$t = markType(BrowserExecutionContext, 'BrowserExecutionContext', Base.$, [IExecutionContext_$type]); return BrowserExecutionContext; }(Base)); export { BrowserExecutionContext };