UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

150 lines (149 loc) 4.9 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 { LegendBase } from "./LegendBase"; import { LegendBaseView } from "./LegendBaseView"; import { Base, fromEn, delegateCombine, fromEnum, typeCast, markType } from "igniteui-angular-core"; import { LegendItemInfo } from "./LegendItemInfo"; import { ContentControl } from "igniteui-angular-core"; import { ILegendContext_$type } from "igniteui-angular-core"; /** * @hidden */ export let Legend = /*@__PURE__*/ (() => { class Legend extends LegendBase { constructor() { super(); this.ab = Legend.$; let a = this.aw; a.collectionChanged = delegateCombine(a.collectionChanged, (a, b) => { if (b.oldItems != null) { for (let c of fromEn(b.oldItems)) { this.bk.ao(c); } } if (b.newItems != null) { for (let d of fromEn(b.newItems)) { this.bk.y(d); } } }); } aj() { return new LegendView(this); } bd(a) { super.bd(a); this.bk = a; } bl(a) { return a.resolveLegendIndex(); } bn(a) { return this.bm(a); } addChildInOrder(a, b) { if (b.isStacked) { return; } if (!b.isUsableInLegend) { return; } let c = 0; for (let d of fromEnum(this.aw)) { let e; let f; let g; let h = this.ak.ab(d, e, f, g); e = h.p1; f = h.p2; g = h.p3; if (b.container != null && e != null && (this.bn(b.container) < this.bn(e) || (this.bn(b.container) == -1 && this.bn(e) == -1 && Base.getHashCodeStatic(b.container) < Base.getHashCodeStatic(e)))) { break; } if (b.container != null && e != null && b.container == e && f != null) { let i = this.bl(b); let j = this.bl(f); let k = this.bn(b); let l = this.bn(f); let m = f.isFragment; if (f.isVertical && !f.isStacked && !m) { if (l == -1 && k == -1) { c = 0; break; } if (k < l || l == -1) { break; } } if (i <= j) { break; } } c++; } this.aw.insert(c, a); let n = new LegendItemInfo(); n.c = a; n.a = b; let o = typeCast(ContentControl.$, a); if (o != null && o.content != null) { let p = typeCast(ILegendContext_$type, o.content); if (p != null) { n.b = p; n.d = p.itemLabel; } } this.ax.insert(c, n); } get bj() { return this.ak.l ? 0 : 1; } set bj(a) { let b = this.ak.l; this.ak.l = a == 0; if (this.ak.l != b) { } } bm(a) { return -1; } get bp() { return this.ak.w; } set bp(a) { this.ak.w = a; } get bq() { return this.ak.x; } set bq(a) { let b = this.ak.x; this.ak.x = a; if (a != b) { } } } Legend.$t = markType(Legend, 'Legend', LegendBase.$); return Legend; })(); /** * @hidden */ export let LegendView = /*@__PURE__*/ (() => { class LegendView extends LegendBaseView { constructor(a) { super(a); this.as = null; this.as = a; } al() { super.al(); } } LegendView.$t = markType(LegendView, 'LegendView', LegendBaseView.$); return LegendView; })();