igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
94 lines (93 loc) • 3.58 kB
JavaScript
/*
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 { 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
*/
export let BubbleMarkerManager = /*@__PURE__*/ (() => {
class BubbleMarkerManager extends MarkerManagerBase {
constructor(a, b, c, d, e) {
super(a, b, c, d, e);
this.m = null;
this.o = null;
this.n = null;
this.o = new List$1(Number_$type, 0);
this.n = new List$1(Marker.$, 0);
}
l(a, b, c, d, e) {
let f = this.f();
a.clear();
this.o.clear();
this.n.clear();
let g = new List$1(Number_$type, 0);
b = Math.max(0, b);
let h = null;
this.i(c, d, boxArray$1(f), g);
if (b >= g.count) {
h = g;
}
else {
h = new List$1(Number_$type, 0);
let i = Math.max(8, e);
let j = this.c(d, g, i, boxArray$1(f));
let k = new List$1(Number_$type, 1, j.keys);
if (MarkerManagerBase.b) {
k.y();
}
this.k(b, j, k, h);
}
for (let l = 0; l < h.count; ++l) {
let m = f[h._inner[l]].x;
let n = f[h._inner[l]].y;
let o = this.m.item(h._inner[l]);
this.o.add(o);
let p = this.h(this.g(h._inner[l]));
p.content.item = this.g(h._inner[l]);
p.ak = h._inner[l];
let 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);
}
}
}
j(a, b) {
let c = a.keys;
if (MarkerManagerBase.b) {
let d = new List$1(Base.$, 1, a.keys);
d.aa((e, f) => {
let g = a.item(e);
let h = a.item(f);
let i = Math.pow(g.c.x, 2) + Math.pow(g.c.y, 2);
let j = Math.pow(h.c.x, 2) + Math.pow(h.c.y, 2);
return CompareUtil.compareToObject(i, j);
});
c = d;
}
let e = 0;
for (let f of fromEnum(c)) {
let g = a.item(f);
let h = this.h(g.a);
h.s = e;
h.n = g.c.x;
h.o = g.c.y;
e++;
}
this.a(a);
}
}
BubbleMarkerManager.$t = /*@__PURE__*/ markType(BubbleMarkerManager, 'BubbleMarkerManager', MarkerManagerBase.$);
return BubbleMarkerManager;
})();