UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

113 lines (112 loc) 4.03 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, __values } from "tslib"; import { MarkerManagerBase } from "./MarkerManagerBase"; import { List$1 } from "igniteui-react-core"; import { Marker } from "./Marker"; import { Base, Number_$type, Point_$type, fromEnum, markType } from "igniteui-react-core"; import { OwnedPoint } from "./OwnedPoint"; import { boxArray$1 } from "igniteui-react-core"; import { CompareUtil } from "igniteui-react-core"; /** * @hidden */ var BubbleMarkerManager = /** @class */ /*@__PURE__*/ (function (_super) { __extends(BubbleMarkerManager, _super); function BubbleMarkerManager(a, b, c, d, e) { var _this = _super.call(this, a, b, c, d, e) || this; _this.m = null; _this.o = null; _this.n = null; _this.o = new List$1(Number_$type, 0); _this.n = new List$1(Marker.$, 0); return _this; } BubbleMarkerManager.prototype.l = function (a, b, c, d, e) { var f = this.f(); a.clear(); this.o.clear(); this.n.clear(); var g = new List$1(Number_$type, 0); b = Math.max(0, b); var h = null; this.i(c, d, boxArray$1(f), g); if (b >= g.count) { h = g; } else { h = new List$1(Number_$type, 0); var i = Math.max(8, e); var j = this.c(d, g, i, boxArray$1(f)); var k = new List$1(Number_$type, 1, j.keys); if (MarkerManagerBase.b) { k.y(); } this.k(b, j, k, h); } for (var l = 0; l < h.count; ++l) { var m = f[h._inner[l]].x; var n = f[h._inner[l]].y; var o = this.m.item(h._inner[l]); this.o.add(o); var p = this.h(this.g(h._inner[l])); p.content.item = this.g(h._inner[l]); p.ak = h._inner[l]; var q = new OwnedPoint(); q.a = p.content.item; q.c = { $type: Point_$type, x: m, y: n }; if (!a.containsKey(q.a)) { a.addItem(q.a, q); this.n.add(p); } } }; BubbleMarkerManager.prototype.j = function (a, b) { var e_1, _a; var c = a.keys; if (MarkerManagerBase.b) { var d = new List$1(Base.$, 1, a.keys); d.aa(function (e, f) { var g = a.item(e); var h = a.item(f); var i = Math.pow(g.c.x, 2) + Math.pow(g.c.y, 2); var j = Math.pow(h.c.x, 2) + Math.pow(h.c.y, 2); return CompareUtil.compareToObject(i, j); }); c = d; } var e = 0; try { for (var _b = __values(fromEnum(c)), _c = _b.next(); !_c.done; _c = _b.next()) { var f = _c.value; var g = a.item(f); var h = this.h(g.a); h.s = e; h.n = g.c.x; h.o = g.c.y; e++; } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } this.a(a); }; BubbleMarkerManager.$t = markType(BubbleMarkerManager, 'BubbleMarkerManager', MarkerManagerBase.$); return BubbleMarkerManager; }(MarkerManagerBase)); export { BubbleMarkerManager };