UNPKG

igniteui-react-core

Version:
90 lines (89 loc) 3.48 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, Delegate_$type, runOn, markType } from "./type"; import { INativeUIWindowBridge_$type } from "./INativeUIWindowBridge"; import { List$1 } from "./List$1"; import { NativeUISizeChangedEventArgs } from "./NativeUISizeChangedEventArgs"; import { NativeUIMouseEventArgs } from "./NativeUIMouseEventArgs"; /** * @hidden */ var DOMWindowBridge = /** @class */ /*@__PURE__*/ (function (_super) { __extends(DOMWindowBridge, _super); function DOMWindowBridge() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.b = new List$1(Delegate_$type, 0); _this.a = new List$1(Delegate_$type, 0); return _this; } DOMWindowBridge.prototype.addEventListener = function (a, b) { switch (a) { case 15: if (this.b.count == 0) { window.addEventListener("resize", runOn(this, this.d), false); } this.b.add(b); break; case 9: if (this.a.count == 0) { window.addEventListener("pointerdown", runOn(this, this.c), false); } this.a.add(b); break; } }; DOMWindowBridge.prototype.addEventListener1 = function (a, b, c) { this.addEventListener(a, b); }; DOMWindowBridge.prototype.getHeight = function () { return (window.innerHeight); }; DOMWindowBridge.prototype.getHeight1 = function (a) { return (window.innerHeight); }; DOMWindowBridge.prototype.getWidth = function () { return (window.innerWidth); }; DOMWindowBridge.prototype.getWidth1 = function (a) { return (window.innerWidth); }; DOMWindowBridge.prototype.removeEventListener = function (a, b) { switch (a) { case 15: this.b.remove(b); if (this.b.count == 0) { window.removeEventListener("resize", runOn(this, this.d), false); } break; case 9: this.a.remove(b); if (this.a.count == 0) { window.removeEventListener("pointerdown", runOn(this, this.c), false); } break; } }; DOMWindowBridge.prototype.d = function (a) { var b = new NativeUISizeChangedEventArgs(); b.b = this.getWidth(); b.a = this.getHeight(); for (var c = 0; c < this.b.count; c++) { this.b._inner[c](b); } }; DOMWindowBridge.prototype.c = function (a) { var b = new NativeUIMouseEventArgs(); b.b = a.target; for (var c = 0; c < this.a.count; c++) { this.a._inner[c](b); } }; DOMWindowBridge.$t = markType(DOMWindowBridge, 'DOMWindowBridge', Base.$, [INativeUIWindowBridge_$type]); return DOMWindowBridge; }(Base)); export { DOMWindowBridge };