UNPKG

igniteui-react-charts

Version:

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

914 lines (913 loc) 35.1 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 { AnnotationLayer } from "./AnnotationLayer"; import { ValueLayerValueMode_$type } from "./ValueLayerValueMode"; import { DependencyProperty } from "igniteui-react-core"; import { Brush } from "igniteui-react-core"; import { Series } from "./Series"; import { Axis } from "./Axis"; import { Base, enumGetBox, Delegate_$type, Number_$type, typeCast, fromEnum, Point_$type, markType, markDep, runOn } from "igniteui-react-core"; import { Thickness } from "igniteui-react-core"; import { Visibility_$type } from "igniteui-react-core"; import { OverlayTextLocation_$type } from "./OverlayTextLocation"; import { AnnotationAppearanceMode_$type } from "./AnnotationAppearanceMode"; import { OverlayTextUtil } from "./OverlayTextUtil"; import { ValueLayerFrame } from "./ValueLayerFrame"; import { List$1 } from "igniteui-react-core"; import { Dictionary$2 } from "igniteui-react-core"; import { Pool$1 } from "igniteui-react-core"; import { AxisAnnotation } from "./AxisAnnotation"; import { DataLegendSeriesContext } from "igniteui-react-core"; import { DataLegendSeriesValueInfo } from "igniteui-react-core"; import { AxisAnnotationFrameManager } from "./AxisAnnotationFrameManager"; import { DoubleCollection } from "igniteui-react-core"; import { DeviceUtils } from "igniteui-react-core"; import { OverlayTextUpdatingEventArgs } from "./OverlayTextUpdatingEventArgs"; import { OverlayTextInfo } from "./OverlayTextInfo"; import { AnnotationLayerView } from "./AnnotationLayerView"; import { TextBlock } from "igniteui-react-core"; import { Rectangle } from "igniteui-react-core"; import { Rect } from "igniteui-react-core"; import { Tuple$2 } from "igniteui-react-core"; import { Path } from "igniteui-react-core"; import { PathGeometry } from "igniteui-react-core"; import { PathFigure } from "igniteui-react-core"; import { LineSegment } from "igniteui-react-core"; import { BrushUtil } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; import { isNaN_ } from "igniteui-react-core"; import { stringIsNullOrEmpty } from "igniteui-react-core"; import { Defaults } from "./Defaults"; import { TranslateTransform } from "igniteui-react-core"; import { LineGeometry } from "igniteui-react-core"; /** * @hidden */ export let ValueLayer = /*@__PURE__*/ (() => { class ValueLayer extends AnnotationLayer { bk() { return new ValueLayer(); } get_ev() { return true; } constructor() { super(); this.aap = null; this.aaa = [NaN, NaN]; this.aaj = null; this.aak = null; this.afh = null; this.stylingOverlayText = null; this.aa0 = null; this.aaz = null; let a = new ValueLayerFrame(); let b = new ValueLayerFrame(); let c = new ValueLayerFrame(); let d = this.ke / 1000; this.xh = a; this.xg = b; this.xi = c; this.ab = ValueLayer.$; this.aap = OverlayTextUtil.c(); } ct() { return new ValueLayerView(this); } q3(a) { super.q3(a); this.aao = a; } gv(a) { if (this.aal == null) { return true; } if (this.aal == a) { return true; } return false; } get afj() { return new Thickness(1, this.abd, this.abf, this.abe, this.abc); } get afk() { return new Thickness(1, this.abj, this.abl, this.abk, this.abi); } get aaq() { return this.aap; } set aaq(a) { let b = this.aap; if (OverlayTextUtil.q(a)) { a = OverlayTextUtil.c(); } this.aap = a; if (b != this.aap) { this.raisePropertyChanged("OverlayTextStyle", b, this.aap); } } me() { return "Value Layer"; } get_isSummarizationSupported() { return false; } i6(a, b, c) { if (isNaN_(this.aaa[0]) && isNaN_(this.aaa[1])) { return super.i6(a, b, c); } if (!isNaN_(this.aaa[0])) { return this.aaa[0]; } return this.aaa[1]; } getDataLegendSeriesContextAt(a, b) { if (isNaN_(this.aaa[0]) || isNaN_(this.aaa[1])) { return super.getDataLegendSeriesContextAt(a, b); } if (this.aal == null) { let c = new DataLegendSeriesValueInfo(); c.l = this.aaa[0]; c.a = 0; c.q = "Value"; c.r = "Value"; c.s = ""; let d = new DataLegendSeriesValueInfo(); d.l = this.aaa[1]; d.a = 0; d.q = "Value"; d.r = "Value"; d.s = ""; let e = new DataLegendSeriesContext(); e.e = ((() => { let $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(c); $ret.add(d); return $ret; })()); e.h = this.me(); return e; } let f = this.aal.getDataLegendSeriesContextAt(a, b); let g = typeCast(DataLegendSeriesContext.$, f); if (g == null || g.e == null) { return super.getDataLegendSeriesContextAt(a, b); } if (g.e.count == 0) { g.e._inner[0].l = isNaN_(this.aaa[0]) ? this.aaa[1] : this.aaa[0]; } else { g.e._inner[0].l = this.aaa[0]; g.e._inner[1].l = this.aaa[1]; } return g; } yw(a, b) { if (this.aal == null || this.aal == a) { if (!this.a1.c) { this.ru(b); } } } yy(a, b) { super.yy(a, b); let c = a; let d = this.aay; let e = this.aax; c.af.clear(); c.ag.clear(); c.ae.clear(); c.ah.clear(); AxisAnnotationFrameManager.b(c); this.aaa = [NaN, NaN]; this.aaj = null; this.aak = null; this.aao.cu(); let f = this.aam(); if (this.xn(this.aal)) { let g = this.aal.aq(f); this.aaa = g; this.adf(c, d, e, this.aal); } else { if (f == 5 || f == 4 || f == 6) { let h = null; let i = null; let j = [NaN, NaN]; let k = 0; for (let l of fromEnum(this.dc.series)) { if (!this.xn(l)) { continue; } let m = l.ai(); for (let o = 0; o < m.length; o++) { let n = m[o]; if (!this.aas(n)) { continue; } let p = n.cp ? 1 : 0; let q = j[p]; let r = null; if (f == 5) { let s = l.i9(2, n); if (!isNaN_(s) && (s > q || isNaN_(q))) { r = l; } q = !isNaN_(q) ? Math.max(s, q) : s; } else if (f == 4) { let t = l.i9(1, n); if (!isNaN_(t) && (t < q || isNaN_(q))) { r = l; } q = !isNaN_(q) ? Math.min(t, q) : t; } else if (f == 6) { let u = l.i9(3, n); r = l; q = !isNaN_(q) ? q + u : u; } if (n.cp) { i = r != null ? r : i; } else { h = r != null ? r : h; } j[p] = q; } k++; } if (f == 6) { j[0] = !isNaN_(j[0]) ? j[0] / k : NaN; j[1] = !isNaN_(j[1]) ? j[1] / k : NaN; } if (h != null && !isNaN_(j[0])) { let v = h.wl(j); this.adi(h, { $type: Point_$type, x: v.x, y: NaN }, c, d, e); } if (i != null && !isNaN_(j[1])) { let w = i.wl(j); this.adi(i, { $type: Point_$type, x: NaN, y: w.y }, c, d, e); } this.aaa = j; this.aaj = h; this.aak = i; } else { for (let x of fromEnum(this.dc.series)) { this.adf(c, d, e, x); } } } } adf(a, b, c, d) { if (this.xn(d)) { this.adh(d, a, b, c); } if (d.isStacked) { d.p5((e) => { if (this.xn(e)) { this.adh(e, a, b, c); } if (e.ei) { e.p3((f) => { if (this.xn(f)) { this.adh(f, a, b, c); } return true; }); } return true; }); } if (d.ei) { d.p3((e) => { if (this.xn(e)) { this.adh(e, a, b, c); } return true; }); } } xn(a) { if (!super.xn(a)) { return false; } if (this.acl != null) { if (a.isFragment) { let b = a.ne(); if (!Base.equalsStatic(this.acl, b)) { return false; } } else { if (!Base.equalsStatic(this.acl, a.name)) { return false; } } } return true; } aas(a) { if (!a.cj) { return false; } if (this.aae != null && this.aae != a) { return false; } if (this.aci != null && !Base.equalsStatic(this.aci, a.name)) { return false; } return true; } qr() { super.qr(); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.adj(this.xi, false); } else { this.adj(this.xg, false); } } aam() { if (this.aan == 0) { return 2; } return this.aan; } w7() { return 3; } xu() { return 0.3; } xx() { return -0.4; } xw() { return 0.5; } zz() { return this.w4 == 3 ? this.afi() : null; } z0() { return this.w5 == 3 ? this.afi() : null; } afi() { if (this.afh == null) { this.afh = new DoubleCollection(); this.afh.add(DeviceUtils.g(5)); this.afh.add(DeviceUtils.g(5)); } return this.afh; } adg() { if (OverlayTextUtil.q(this.aap)) { this.aap = OverlayTextUtil.c(); } else if (OverlayTextUtil.k(this.aap)) { this.aap = this.cw.l(this.aap.fontString); } } adi(a, b, c, d, e) { let f = false; let g = this.ae5; if (g == null) { g = a.ve; f = true; } let h = false; let i = this.afb; if (i == null) { if (this.ae5 != null) { i = this.ae5; } else { i = a.ve; h = true; } } let j = false; let k = this.afe; if (k == null) { if (this.ae5 != null) { k = this.ae5; } else { k = a.ve; j = true; } } let l = g; let m = g; let n = i; let o = k; if (this.ae6 != null) { l = this.ae6; } else if (f) { switch (this.w4) { case 1: l = this.aao.ck(l, this.xr); break; case 2: l = this.aao.cm(l, this.xr); break; case 4: l = this.aao.cl(l, this.xr); break; } } if (this.afa != null) { m = this.afa; } else if (f) { switch (this.w5) { case 1: m = this.aao.ck(m, this.xt); break; case 2: m = this.aao.cm(m, this.xt); break; case 4: m = this.aao.cl(m, this.xt); break; } } if (h) { switch (this.w5) { case 1: n = this.aao.ck(n, this.xt); break; case 2: n = this.aao.cm(n, this.xt); break; } } if (j) { switch (this.w4) { case 1: o = this.aao.ck(o, this.xr); break; case 2: o = this.aao.cm(o, this.xr); break; } } c.ae.add(l); c.ah.add(m); c.af.add(b.y); c.ag.add(b.x); let p = isNaN_(b.x); let q = p ? b.y : b.x; this.adg(); let r = this.aaq; let s = OverlayTextUtil.o(r, this.aaw); let t = this.aah; if (t == 18) { s = false; } let u = this.vi; if (s && !stringIsNullOrEmpty(this.abt)) { let v = new OverlayTextUpdatingEventArgs(); v.textLocation = this.aah; v.textAngle = this.aa1; v.textVisible = this.aaw; v.textContent = this.abt; v.textColorMode = this.aad; v.textColorShift = this.aa6; v.textColor = this.aav ? g : this.ae9; v.backgroundMode = this.aab; v.backgroundShift = this.aa2; v.background = this.aat ? g : this.ae7; v.borderMode = this.aac; v.borderShift = this.aa4; v.borderStroke = this.aau ? g : this.ae8; v.borderRadius = this.aa3; v.borderThickness = this.aa5; v.shapeBrush = g; v.shapeOutline = g; v.f = p; v.horizontalMargin = this.aa7; v.verticalPadding = this.aba; v.verticalMargin = this.aa9; v.horizontalPadding = this.aa8; if (this.stylingOverlayText != null) { this.stylingOverlayText(this, v); } OverlayTextUtil.ad(v); let w = OverlayTextInfo.d(v); if (w.textVisible && !w.h) { this.aao.cq.count += 1; this.aao.cp.count += 1; let x = this.aao.cq.count - 1; w.f = r; w.ad = this.cw.cc(w.textContent, w.f); w.u = this.aao.cq.item(x); w.ac = this.aao.cp.item(x); if (w.g) { let y = this.dc.wl({ $type: Point_$type, x: 0, y: NaN }); let z = this.dc.wl({ $type: Point_$type, x: 1, y: NaN }); let aa = z.x - y.x; w.ab = new Rect(0, y.x, q, aa, 1); } else { let ab = this.dc.wl({ $type: Point_$type, x: NaN, y: 0 }); let ac = this.dc.wl({ $type: Point_$type, x: NaN, y: 1 }); let ad = ac.y - ab.y; w.ab = new Rect(0, q, ab.y, 1, ad); } OverlayTextUtil.ac(w); this.cw.av(w.u, w.f); this.cw.aw(w.u, w.f); } } if (this.aar) { AxisAnnotationFrameManager.c(c, b, a, this.dc, this.getEffectiveViewport(), g, n, this.abb, this.afd, this.afc, this.afj, this.abg, o, this.abh, this.afg, this.aff, this.afk, this.abm, this.afm == 0, this.afl == 0); } } adh(a, b, c, d) { let e = { $type: Point_$type, x: NaN, y: NaN }; let f = this.aam(); switch (f) { case 5: e = a.wk(2); break; case 4: e = a.wk(1); break; case 6: e = a.wk(3); break; default: e = a.wk(f); break; } let i = a.ai(); for (let h = 0; h < i.length; h++) { let g = i[h]; if (!this.aas(g)) { continue; } if (g.cp) { this.adi(a, { $type: Point_$type, x: NaN, y: e.y }, b, c, d); } else { this.adi(a, { $type: Point_$type, x: e.x, y: NaN }, b, c, d); } } } adj(a, b) { let c = false; if (this.aaz == null) { c = true; this.aa0 = new List$1(Axis.$, 0); this.aaz = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.aaz, this.aa0, b, this.abn, this.abo, this.aaf, this.aag); } ade(a, b, c, d, e) { let f = a.item(b); b++; if (e) { f._stroke = d.ah._inner[c]; f._fill = d.ah._inner[c]; } else { f._stroke = d.ae._inner[c]; f._fill = d.ae._inner[c]; } f.ad = this.ig; f.ai = e ? this.zx : this.zw; f.am = this.wa; f.al = this.v9; f.ak = this.v9; f.aj = this.v8; f.ac = this.ji; return new Tuple$2(Path.$, Number_$type, f, b); } y1(a, b) { super.y1(a, b); let c = this.aao.co; let d = a; let e = d.af.count; let f = 0; let g = b.b9.left; let h = b.b9.right; let i = b.b9.top; let j = b.b9.bottom; let k = this.afm == 0; let l = this.afl == 0; for (let m = 0; m < e; m++) { let n = Math.floor(d.af._inner[m]); let o = Math.floor(d.ag._inner[m]); let p = null; if (k) { if (!isNaN_(o)) { let q = this.ade(c, f, m, d, true); p = q.c; f = q.d; let r = new PathGeometry(); let s = new PathFigure(); s._startPoint = { $type: Point_$type, x: o, y: i }; let t = new LineSegment(1); t.c = { $type: Point_$type, x: o, y: j }; s._segments.add(t); r.c.add(s); p.an = r; } } if (l) { if (!isNaN_(n)) { let u = this.ade(c, f, m, d, false); p = u.c; f = u.d; let v = new PathGeometry(); let w = new PathFigure(); w._startPoint = { $type: Point_$type, x: g, y: n }; let x = new LineSegment(1); x.c = { $type: Point_$type, x: h, y: n }; w._segments.add(x); v.c.add(w); p.an = v; } } } c.count = f; if (this.d4()) { this.adj(this.xi, true); } else { this.adj(this.xg, false); } } gb() { return true; } rc(a, b, c, d) { super.rc(a, b, c, d); switch (b) { case "SeriesViewer": if (d == null) { if (this.aaz != null && this.aaz.count > 0) { let e; if (this.d4()) { e = this.xi; } else { e = this.xg; } AxisAnnotationFrameManager.b(e); AxisAnnotationFrameManager.d(this, e, true, this.aaz, this.aa0, true, this.abn, this.abo, this.aaf, this.aag); } } break; case ValueLayer.$$p[2]: this.ru(true); break; case ValueLayer.$$p[34]: this.ru(true); break; case ValueLayer.$$p[29]: case ValueLayer.$$p[30]: case "Visibility": this.ru(true); break; case ValueLayer.$$p[3]: case ValueLayer.$$p[36]: case ValueLayer.$$p[35]: case ValueLayer.$$p[39]: case ValueLayer.$$p[41]: case ValueLayer.$$p[43]: case ValueLayer.$$p[42]: case ValueLayer.$$p[40]: case ValueLayer.$$p[44]: case ValueLayer.$$p[45]: case ValueLayer.$$p[47]: case ValueLayer.$$p[50]: case ValueLayer.$$p[52]: case ValueLayer.$$p[54]: case ValueLayer.$$p[53]: case ValueLayer.$$p[51]: case ValueLayer.$$p[55]: case ValueLayer.$$p[56]: case ValueLayer.$$p[1]: case ValueLayer.$$p[33]: case ValueLayer.$$p[31]: this.ru(true); break; case "Brush": case ValueLayer.$$p[32]: if (this.vk != null) { this.ae5 = this.vk; } else { switch (this.aan) { case 6: this.ae5 = BrushUtil.j(255, 248, 173, 118); break; case 4: this.ae5 = BrushUtil.j(255, 246, 93, 80); break; case 5: this.ae5 = BrushUtil.j(255, 99, 208, 0); break; default: this.ae5 = this.aal != null ? this.aal.ve : null; break; } } this.ru(true); break; case ValueLayer.$$p[22]: case ValueLayer.$$p[25]: case ValueLayer.$$p[21]: case ValueLayer.$$p[4]: case ValueLayer.$$p[17]: case ValueLayer.$$p[15]: case ValueLayer.$$p[16]: case ValueLayer.$$p[18]: case ValueLayer.$$p[7]: case ValueLayer.$$p[5]: case ValueLayer.$$p[6]: case ValueLayer.$$p[8]: case ValueLayer.$$p[10]: case ValueLayer.$$p[11]: case ValueLayer.$$p[13]: case ValueLayer.$$p[9]: case ValueLayer.$$p[12]: case ValueLayer.$$p[14]: case ValueLayer.$$p[19]: case ValueLayer.$$p[20]: case ValueLayer.$$p[24]: case ValueLayer.$$p[23]: this.ru(true); break; } } o7(a, b) { super.o7(a, b); if (a) { AxisAnnotationFrameManager.b(this.xg); this.adj(this.xg, false); } } } ValueLayer.$t = /*@__PURE__*/ markType(ValueLayer, 'ValueLayer', AnnotationLayer.$); ValueLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, ValueLayer, 'raisePropertyChanged', ['ActualValueLayerBrush:ae5:adk', [Brush.$, null], 'HorizontalLineStroke:ae6:adl', [Brush.$, null], 'HorizontalLineVisibility:afl:adm', [Visibility_$type, /*@__PURE__*/ enumGetBox(Visibility_$type, 0)], 'IsAxisAnnotationEnabled:aar:adn', [0, false], 'OverlayTextAngle:aa1:ado', [1, NaN], 'OverlayTextBackgroundMatchLayer:aat:adp', [0, false], 'OverlayTextBackgroundMode:aab:adq', [AnnotationAppearanceMode_$type, /*@__PURE__*/ enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBackground:ae7:adr', [Brush.$, null], 'OverlayTextBackgroundShift:aa2:ads', [1, NaN], 'OverlayTextBorderColor:ae8:adt', [Brush.$, null], 'OverlayTextBorderMatchLayer:aau:adu', [0, false], 'OverlayTextBorderMode:aac:adv', [AnnotationAppearanceMode_$type, /*@__PURE__*/ enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBorderRadius:aa3:adw', [1, NaN], 'OverlayTextBorderShift:aa4:adx', [1, NaN], 'OverlayTextBorderThickness:aa5:ady', [1, 1], 'OverlayTextColorMatchLayer:aav:adz', [0, true], 'OverlayTextColorMode:aad:ad0', [AnnotationAppearanceMode_$type, /*@__PURE__*/ enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextColor:ae9:ad1', [Brush.$, null], 'OverlayTextColorShift:aa6:ad2', [1, NaN], 'OverlayTextHorizontalMargin:aa7:ad3', [1, NaN], 'OverlayTextHorizontalPadding:aa8:ad4', [1, NaN], 'OverlayTextLocation:aah:ad5', [OverlayTextLocation_$type, /*@__PURE__*/ enumGetBox(OverlayTextLocation_$type, 0)], 'OverlayText:abt:ad6', [2, null], 'OverlayTextVerticalMargin:aa9:ad7', [1, NaN], 'OverlayTextVerticalPadding:aba:ad8', [1, NaN], 'OverlayTextVisible:aaw:ad9', [0, true], 'SkipUnknownValues:aax:aea', [0, true], 'TargetAxisName:aci:aeb', [2, null], 'TargetAxis:aae:aec', [Axis.$, null], 'TargetSeriesName:acl:aed', [2, null], 'TargetSeries:aal:aee', [Series.$, null], 'UseInterpolation:aay:aef', [0, true], 'ValueMode:aan:aeg', [ValueLayerValueMode_$type, /*@__PURE__*/ enumGetBox(ValueLayerValueMode_$type, 2)], 'VerticalLineStroke:afa:aeh', [Brush.$, null], 'VerticalLineVisibility:afm:aei', [Visibility_$type, /*@__PURE__*/ enumGetBox(Visibility_$type, 0)], 'XAxisAnnotationBackgroundCornerRadius:abb:aej', [1, /*@__PURE__*/ DeviceUtils.g(3)], 'XAxisAnnotationBackground:afb:aek', [Brush.$, null], 'XAxisAnnotationFormatLabel:aaf:ael', [Delegate_$type], 'XAxisAnnotationInterpolatedValuePrecision:abn:aem', [1, -1], 'XAxisAnnotationOutline:afc:aen', [Brush.$, null], 'XAxisAnnotationPaddingBottom:abc:aeo', [1, NaN], 'XAxisAnnotationPaddingLeft:abd:aep', [1, NaN], 'XAxisAnnotationPaddingRight:abe:aeq', [1, NaN], 'XAxisAnnotationPaddingTop:abf:aer', [1, NaN], 'XAxisAnnotationStrokeThickness:abg:aes', [1, NaN], 'XAxisAnnotationTextColor:afd:aet', [Brush.$, null], 'YAxisAnnotationBackgroundCornerRadius:abh:aeu', [1, /*@__PURE__*/ DeviceUtils.g(3)], 'YAxisAnnotationBackground:afe:aev', [Brush.$, null], 'YAxisAnnotationFormatLabel:aag:aew', [Delegate_$type], 'YAxisAnnotationInterpolatedValuePrecision:abo:aex', [1, -1], 'YAxisAnnotationOutline:aff:aey', [Brush.$, null], 'YAxisAnnotationPaddingBottom:abi:aez', [1, NaN], 'YAxisAnnotationPaddingLeft:abj:ae0', [1, NaN], 'YAxisAnnotationPaddingRight:abk:ae1', [1, NaN], 'YAxisAnnotationPaddingTop:abl:ae2', [1, NaN], 'YAxisAnnotationStrokeThickness:abm:ae3', [1, NaN], 'YAxisAnnotationTextColor:afg:ae4', [Brush.$, null]]); return ValueLayer; })(); /** * @hidden */ export let ValueLayerView = /*@__PURE__*/ (() => { class ValueLayerView extends AnnotationLayerView { constructor(a) { super(a); this.cn = null; this.co = null; this.ct = null; this.cs = null; this.cq = null; this.cr = null; this.cp = null; this.cn = a; this.ct = new List$1(Path.$, 0); } cu() { OverlayTextUtil.u(this.cq); OverlayTextUtil.v(this.cs); this.cp.clear(); this.cr.clear(); this.cq.count = 0; this.cp.count = 0; } a4() { super.a4(); this.co = ((() => { let $ret = new Pool$1(Path.$); $ret.create = runOn(this, this.c6); $ret.activate = runOn(this, this.cv); $ret.disactivate = runOn(this, this.cx); $ret.destroy = runOn(this, this.cw); return $ret; })()); this.cs = new List$1(TextBlock.$, 0); this.cq = ((() => { let $ret = new Pool$1(TextBlock.$); $ret.create = runOn(this, this.c5); $ret.activate = runOn(this, this.c1); $ret.disactivate = runOn(this, this.c3); $ret.destroy = runOn(this, this.c2); return $ret; })()); this.cr = new List$1(Rectangle.$, 0); this.cp = ((() => { let $ret = new Pool$1(Rectangle.$); $ret.create = runOn(this, this.c7); $ret.activate = runOn(this, this.cy); $ret.disactivate = runOn(this, this.c0); $ret.destroy = runOn(this, this.cz); return $ret; })()); this.cn.jq = Defaults.crosshairLineThickness; } c5() { let a = new TextBlock(); this.cs.add(a); return a; } c2(a) { if (this.cs.contains(a)) { this.cs.remove(a); } } c1(a) { a._visibility = 0; a.s = 0; } c3(a) { a._visibility = 1; } c7() { let a = new Rectangle(); this.cr.add(a); return a; } cz(a) { a.dataContext = null; if (this.cr.contains(a)) { this.cr.remove(a); } } cy(a) { a._visibility = 0; } c0(a) { a._visibility = 1; } c6() { let a = new Path(); a.j = new TranslateTransform(); this.ct.add(a); return a; } cv(a) { a._visibility = 0; } cx(a) { a._visibility = 1; } cw(a) { this.ct.remove(a); } c4(a, b, c, d) { if (a.an == null || a.an.c.x != d || a.an.d.x != c) { let e = ((() => { let $ret = new LineGeometry(); $ret.d = { $type: Point_$type, x: c, y: b }; $ret.c = { $type: Point_$type, x: d, y: b }; return $ret; })()); a.an = e; } } bj(a, b) { super.bj(a, b); if (a.d && !b) { for (let c = 0; c < this.ct.count; c++) { let d = this.ct._inner[c]; if (d._visibility == 0) { a.t(d); } } for (let e = 0; e < this.cp.count; e++) { let f = this.cp.item(e); if (f._visibility == 0) { a.w(f); } } for (let g = 0; g < this.cq.count; g++) { let h = this.cq.item(g); a.ad(h.dataContext); a.x(h); } } } ax(a) { super.ax(a); for (let b = 0; b < this.ct.count; b++) { this.f.bc.exportPathData(a, this.ct._inner[b], "crosshairLine", ["Main", "Crosshair"]); } } } ValueLayerView.$t = /*@__PURE__*/ markType(ValueLayerView, 'ValueLayerView', AnnotationLayerView.$); return ValueLayerView; })();