UNPKG

igniteui-react-core

Version:
52 lines (51 loc) 1.82 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 { CollisionGeometry } from "./CollisionGeometry"; import { CollisionRect } from "./CollisionRect"; import { markType } from "./type"; /** * @hidden */ export let BoxesCollisionGeometry = /*@__PURE__*/ (() => { class BoxesCollisionGeometry extends CollisionGeometry { get_type() { return 0; } get type() { return this.get_type(); } constructor(a) { super(); this.g = null; this.h = CollisionRect.empty; this.g = a; } get_boundingBox() { if (this.h.isEmpty) { let a = CollisionRect.empty; for (let b = 0; b < this.g.length; b++) { a.union(this.g[b]); } this.h = a; } return this.h; } get boundingBox() { return this.get_boundingBox(); } d(a) { for (let b = 0; b < this.g.length; b++) { if (a.intersectsWith(this.g[b])) { return true; } } return false; } } BoxesCollisionGeometry.$t = /*@__PURE__*/ markType(BoxesCollisionGeometry, 'BoxesCollisionGeometry', CollisionGeometry.$); return BoxesCollisionGeometry; })();