UNPKG

igniteui-react-charts

Version:

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

924 lines (923 loc) 35.2 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 { 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 { AxisAnnotationFramePrepareSettings } from "./AxisAnnotationFramePrepareSettings"; 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_ew() { return true; } constructor() { super(); this.aa9 = null; this.aau = [NaN, NaN]; this.aa3 = null; this.aa4 = null; this.afv = null; this.stylingOverlayText = null; this.abk = null; this.abj = null; let a = new ValueLayerFrame(); let b = new ValueLayerFrame(); let c = new ValueLayerFrame(); let d = this.ko / 1000; this.xz = a; this.xy = b; this.x0 = c; this.ab = ValueLayer.$; this.aa9 = OverlayTextUtil.c(); } ct() { return new ValueLayerView(this); } rj(a) { super.rj(a); this.aa8 = a; } g2(a) { if (this.aa5 == null) { return true; } if (this.aa5 == a) { return true; } return false; } get afx() { return new Thickness(1, this.abx, this.abz, this.aby, this.abw); } get afy() { return new Thickness(1, this.ab3, this.ab5, this.ab4, this.ab2); } get aba() { return this.aa9; } set aba(a) { let b = this.aa9; if (OverlayTextUtil.q(a)) { a = OverlayTextUtil.c(); } this.aa9 = a; if (b != this.aa9) { this.raisePropertyChanged("OverlayTextStyle", b, this.aa9); } } mp() { return "Value Layer"; } get_isSummarizationSupported() { return false; } jf(a, b, c) { if (isNaN_(this.aau[0]) && isNaN_(this.aau[1])) { return super.jf(a, b, c); } if (!isNaN_(this.aau[0])) { return this.aau[0]; } return this.aau[1]; } getDataLegendSeriesContextAt(a, b) { if (isNaN_(this.aau[0]) || isNaN_(this.aau[1])) { return super.getDataLegendSeriesContextAt(a, b); } if (this.aa5 == null) { let c = new DataLegendSeriesValueInfo(); c.l = this.aau[0]; c.a = 0; c.q = "Value"; c.r = "Value"; c.s = ""; let d = new DataLegendSeriesValueInfo(); d.l = this.aau[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.mp(); return e; } let f = this.aa5.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.aau[0]) ? this.aau[1] : this.aau[0]; } else { g.e._inner[0].l = this.aau[0]; g.e._inner[1].l = this.aau[1]; } return g; } zf(a, b) { if (this.aa5 == null || this.aa5 == a) { if (!this.a1.c) { this.sa(b); } } } zh(a, b) { super.zh(a, b); let c = a; let d = this.abi; let e = this.abh; c.a1.clear(); c.a2.clear(); c.a0.clear(); c.a3.clear(); AxisAnnotationFrameManager.b(c); this.aau = [NaN, NaN]; this.aa3 = null; this.aa4 = null; this.aa8.cu(); let f = this.aa6(); if (this.x6(this.aa5)) { let g = this.aa5.aq(f); this.aau = g; this.adv(c, d, e, this.aa5); } 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.b9)) { if (!this.x6(l)) { continue; } let m = l.ai(); for (let o = 0; o < m.length; o++) { let n = m[o]; if (!this.abc(n)) { continue; } let p = n.dz ? 1 : 0; let q = j[p]; let r = null; if (f == 5) { let s = l.ji(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.ji(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.ji(3, n); r = l; q = !isNaN_(q) ? q + u : u; } if (n.dz) { 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.w2(j); this.ady(h, { $type: Point_$type, x: v.x, y: NaN }, c, d, e); } if (i != null && !isNaN_(j[1])) { let w = i.w2(j); this.ady(i, { $type: Point_$type, x: NaN, y: w.y }, c, d, e); } this.aau = j; this.aa3 = h; this.aa4 = i; } else { for (let x of fromEnum(this.dc.b9)) { this.adv(c, d, e, x); } } } } adv(a, b, c, d) { if (this.x6(d)) { this.adx(d, a, b, c); } if (d.isStacked) { d.qj((e) => { if (this.x6(e)) { this.adx(e, a, b, c); } if (e.ei) { e.qh((f) => { if (this.x6(f)) { this.adx(f, a, b, c); } return true; }); } return true; }); } if (d.ei) { d.qh((e) => { if (this.x6(e)) { this.adx(e, a, b, c); } return true; }); } } x6(a) { if (!super.x6(a)) { return false; } return true; } abc(a) { if (!a.dq) { return false; } if (this.aay != null && this.aay != a) { return false; } return true; } q6() { super.q6(); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.adz(this.x0, false); } else { this.adz(this.xy, false); } } aa6() { if (this.aa7 == 0) { return 2; } return this.aa7; } xp() { return 3; } yd() { return 0.3; } yg() { return -0.4; } yf() { return 0.5; } aaj() { return this.xm == 3 ? this.afw() : null; } aak() { return this.xn == 3 ? this.afw() : null; } afw() { if (this.afv == null) { this.afv = new DoubleCollection(); this.afv.add(DeviceUtils.g(5)); this.afv.add(DeviceUtils.g(5)); } return this.afv; } adw() { if (OverlayTextUtil.q(this.aa9)) { this.aa9 = OverlayTextUtil.c(); } else if (OverlayTextUtil.k(this.aa9)) { this.aa9 = this.cw.l(this.aa9.fontString); } } ady(a, b, c, d, e) { let f = false; let g = this.afj; if (g == null) { g = a.vv; f = true; } let h = false; let i = this.afp; if (i == null) { if (this.afj != null) { i = this.afj; } else { i = a.vv; h = true; } } let j = false; let k = this.afs; if (k == null) { if (this.afj != null) { k = this.afj; } else { k = a.vv; j = true; } } let l = g; let m = g; let n = i; let o = k; if (this.afk != null) { l = this.afk; } else if (f) { switch (this.xm) { case 1: l = this.aa8.ck(l, this.ya); break; case 2: l = this.aa8.cm(l, this.ya); break; case 4: l = this.aa8.cl(l, this.ya); break; } } if (this.afo != null) { m = this.afo; } else if (f) { switch (this.xn) { case 1: m = this.aa8.ck(m, this.yc); break; case 2: m = this.aa8.cm(m, this.yc); break; case 4: m = this.aa8.cl(m, this.yc); break; } } if (h) { switch (this.xn) { case 1: n = this.aa8.ck(n, this.yc); break; case 2: n = this.aa8.cm(n, this.yc); break; } } if (j) { switch (this.xm) { case 1: o = this.aa8.ck(o, this.ya); break; case 2: o = this.aa8.cm(o, this.ya); break; } } c.a0.add(l); c.a3.add(m); c.a1.add(b.y); c.a2.add(b.x); let p = isNaN_(b.x); let q = p ? b.y : b.x; this.adw(); let r = this.aba; let s = OverlayTextUtil.o(r, this.abg); let t = this.aa1; if (t == 18) { s = false; } if (s && !stringIsNullOrEmpty(this.acd)) { let u = this.afn; if (u == null && this.abf) { u = g; } let v = this.afl; if (v == null && this.abd) { v = g; } let w = this.afm; if (w == null && this.abe) { w = g; } let x = new OverlayTextUpdatingEventArgs(); x.textLocation = this.aa1; x.textAngle = this.abl; x.textVisible = this.abg; x.textContent = this.acd; x.textColorMode = this.aax; x.textColorShift = this.abq; x.textColor = u; x.backgroundMode = this.aav; x.backgroundShift = this.abm; x.background = v; x.borderMode = this.aaw; x.borderShift = this.abo; x.borderStroke = w; x.borderRadius = this.abn; x.borderThickness = this.abp; x.shapeBrush = g; x.shapeOutline = g; x.f = p; x.horizontalMargin = this.abr; x.verticalPadding = this.abu; x.verticalMargin = this.abt; x.horizontalPadding = this.abs; if (this.stylingOverlayText != null) { this.stylingOverlayText(this, x); } OverlayTextUtil.ad(x); let y = OverlayTextInfo.d(x); if (y.textVisible && !y.h) { this.aa8.cq.count += 1; this.aa8.cp.count += 1; let z = this.aa8.cq.count - 1; y.f = r; y.ad = this.cw.cc(y.textContent, y.f); y.u = this.aa8.cq.item(z); y.ac = this.aa8.cp.item(z); if (y.g) { let aa = this.dc.yn({ $type: Point_$type, x: 0, y: NaN }); let ab = this.dc.yn({ $type: Point_$type, x: 1, y: NaN }); let ac = ab.x - aa.x; y.ab = new Rect(0, aa.x, q, ac, 1); } else { let ad = this.dc.yn({ $type: Point_$type, x: NaN, y: 0 }); let ae = this.dc.yn({ $type: Point_$type, x: NaN, y: 1 }); let af = ae.y - ad.y; y.ab = new Rect(0, q, ad.y, 1, af); } OverlayTextUtil.ac(y); this.cw.av(y.u, y.f); this.cw.aw(y.u, y.f); } } if (this.abb) { let ag = new AxisAnnotationFramePrepareSettings(); ag.u = n; ag.y = this.afr; ag.x = this.afq; ag.g = this.abv; ag.ae = this.afx; ag.l = this.ab0; ag.c = this.af0 == 0; ag.z = o; ag.ad = this.afu; ag.ac = this.aft; ag.m = this.ab1; ag.af = this.afy; ag.r = this.ab6; ag.d = this.afz == 0; AxisAnnotationFrameManager.c(c, b, a, this.dc, this.getEffectiveViewport(), g, ag); } } adx(a, b, c, d) { let e = { $type: Point_$type, x: NaN, y: NaN }; let f = this.aa6(); switch (f) { case 5: e = a.w1(2); break; case 4: e = a.w1(1); break; case 6: e = a.w1(3); break; default: e = a.w1(f); break; } let i = a.ai(); for (let h = 0; h < i.length; h++) { let g = i[h]; if (!this.abc(g)) { continue; } if (g.dz) { this.ady(a, { $type: Point_$type, x: NaN, y: e.y }, b, c, d); } else { this.ady(a, { $type: Point_$type, x: e.x, y: NaN }, b, c, d); } } } adz(a, b) { let c = false; if (this.abj == null) { c = true; this.abk = new List$1(Axis.$, 0); this.abj = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.abj, this.abk, b, this.ab7, this.ab8, this.aaz, this.aa0); } adu(a, b, c, d, e) { let f = a.item(b); b++; if (e) { f._stroke = d.a3._inner[c]; f._fill = d.a3._inner[c]; } else { f._stroke = d.a0._inner[c]; f._fill = d.a0._inner[c]; } f.ad = this.io; f.ai = e ? this.aah : this.aag; f.am = this.wr; f.al = this.wq; f.ak = this.wq; f.aj = this.wp; f.ac = this.jr; return new Tuple$2(Path.$, Number_$type, f, b); } zk(a, b) { super.zk(a, b); let c = this.aa8.co; let d = a; let e = d.a1.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.af0 == 0; let l = this.afz == 0; for (let m = 0; m < e; m++) { let n = Math.floor(d.a1._inner[m]); let o = Math.floor(d.a2._inner[m]); let p = null; if (k) { if (!isNaN_(o)) { let q = this.adu(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.adu(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.adz(this.x0, true); } else { this.adz(this.xy, false); } } gi() { return true; } rs(a, b, c, d) { super.rs(a, b, c, d); switch (b) { case "SeriesViewer": if (d == null) { if (this.abj != null && this.abj.count > 0) { let e; if (this.d4()) { e = this.x0; } else { e = this.xy; } AxisAnnotationFrameManager.b(e); AxisAnnotationFrameManager.d(this, e, true, this.abj, this.abk, true, this.ab7, this.ab8, this.aaz, this.aa0); } } break; case ValueLayer.$$p[2]: this.sa(true); break; case ValueLayer.$$p[32]: this.sa(true); break; case ValueLayer.$$p[28]: case "Visibility": this.sa(true); break; case ValueLayer.$$p[3]: case ValueLayer.$$p[34]: case ValueLayer.$$p[33]: case ValueLayer.$$p[37]: case ValueLayer.$$p[39]: case ValueLayer.$$p[41]: case ValueLayer.$$p[40]: case ValueLayer.$$p[38]: case ValueLayer.$$p[42]: case ValueLayer.$$p[43]: case ValueLayer.$$p[45]: case ValueLayer.$$p[48]: case ValueLayer.$$p[50]: case ValueLayer.$$p[52]: case ValueLayer.$$p[51]: case ValueLayer.$$p[49]: case ValueLayer.$$p[53]: case ValueLayer.$$p[54]: case ValueLayer.$$p[1]: case ValueLayer.$$p[31]: case ValueLayer.$$p[29]: this.sa(true); break; case "Brush": case ValueLayer.$$p[30]: if (this.v1 != null) { this.afj = this.v1; } else { switch (this.aa7) { case 6: this.afj = BrushUtil.l(255, 248, 173, 118); break; case 4: this.afj = BrushUtil.l(255, 246, 93, 80); break; case 5: this.afj = BrushUtil.l(255, 99, 208, 0); break; default: this.afj = this.aa5 != null ? this.aa5.vv : null; break; } } this.sa(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.sa(true); break; } } pk(a, b) { super.pk(a, b); if (a) { AxisAnnotationFrameManager.b(this.xy); this.adz(this.xy, false); } } } ValueLayer.$t = /*@__PURE__*/ markType(ValueLayer, 'ValueLayer', AnnotationLayer.$); ValueLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, ValueLayer, 'raisePropertyChanged', ['ActualValueLayerBrush:afj:ad0', [Brush.$, null], 'HorizontalLineStroke:afk:ad1', [Brush.$, null], 'HorizontalLineVisibility:afz:ad2', [Visibility_$type, /*@__PURE__*/ enumGetBox(Visibility_$type, 0)], 'IsAxisAnnotationEnabled:abb:ad3', [0, false], 'OverlayTextAngle:abl:ad4', [1, NaN], 'OverlayTextBackgroundMatchLayer:abd:ad5', [0, false], 'OverlayTextBackgroundMode:aav:ad6', [AnnotationAppearanceMode_$type, /*@__PURE__*/ enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBackground:afl:ad7', [Brush.$, null], 'OverlayTextBackgroundShift:abm:ad8', [1, NaN], 'OverlayTextBorderColor:afm:ad9', [Brush.$, null], 'OverlayTextBorderMatchLayer:abe:aea', [0, false], 'OverlayTextBorderMode:aaw:aeb', [AnnotationAppearanceMode_$type, /*@__PURE__*/ enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBorderRadius:abn:aec', [1, NaN], 'OverlayTextBorderShift:abo:aed', [1, NaN], 'OverlayTextBorderThickness:abp:aee', [1, 1], 'OverlayTextColorMatchLayer:abf:aef', [0, true], 'OverlayTextColorMode:aax:aeg', [AnnotationAppearanceMode_$type, /*@__PURE__*/ enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextColor:afn:aeh', [Brush.$, null], 'OverlayTextColorShift:abq:aei', [1, NaN], 'OverlayTextHorizontalMargin:abr:aej', [1, NaN], 'OverlayTextHorizontalPadding:abs:aek', [1, NaN], 'OverlayTextLocation:aa1:ael', [OverlayTextLocation_$type, /*@__PURE__*/ enumGetBox(OverlayTextLocation_$type, 0)], 'OverlayText:acd:aem', [2, null], 'OverlayTextVerticalMargin:abt:aen', [1, NaN], 'OverlayTextVerticalPadding:abu:aeo', [1, NaN], 'OverlayTextVisible:abg:aep', [0, true], 'SkipUnknownValues:abh:aeq', [0, true], 'TargetAxis:aay:aer', [Axis.$, null], 'TargetSeries:aa5:aes', [Series.$, null], 'UseInterpolation:abi:aet', [0, true], 'ValueMode:aa7:aeu', [ValueLayerValueMode_$type, /*@__PURE__*/ enumGetBox(ValueLayerValueMode_$type, 2)], 'VerticalLineStroke:afo:aev', [Brush.$, null], 'VerticalLineVisibility:af0:aew', [Visibility_$type, /*@__PURE__*/ enumGetBox(Visibility_$type, 0)], 'XAxisAnnotationBackgroundCornerRadius:abv:aex', [1, /*@__PURE__*/ DeviceUtils.g(3)], 'XAxisAnnotationBackground:afp:aey', [Brush.$, null], 'XAxisAnnotationFormatLabel:aaz:aez', [Delegate_$type], 'XAxisAnnotationInterpolatedValuePrecision:ab7:ae0', [1, -1], 'XAxisAnnotationOutline:afq:ae1', [Brush.$, null], 'XAxisAnnotationPaddingBottom:abw:ae2', [1, NaN], 'XAxisAnnotationPaddingLeft:abx:ae3', [1, NaN], 'XAxisAnnotationPaddingRight:aby:ae4', [1, NaN], 'XAxisAnnotationPaddingTop:abz:ae5', [1, NaN], 'XAxisAnnotationStrokeThickness:ab0:ae6', [1, NaN], 'XAxisAnnotationTextColor:afr:ae7', [Brush.$, null], 'YAxisAnnotationBackgroundCornerRadius:ab1:ae8', [1, /*@__PURE__*/ DeviceUtils.g(3)], 'YAxisAnnotationBackground:afs:ae9', [Brush.$, null], 'YAxisAnnotationFormatLabel:aa0:afa', [Delegate_$type], 'YAxisAnnotationInterpolatedValuePrecision:ab8:afb', [1, -1], 'YAxisAnnotationOutline:aft:afc', [Brush.$, null], 'YAxisAnnotationPaddingBottom:ab2:afd', [1, NaN], 'YAxisAnnotationPaddingLeft:ab3:afe', [1, NaN], 'YAxisAnnotationPaddingRight:ab4:aff', [1, NaN], 'YAxisAnnotationPaddingTop:ab5:afg', [1, NaN], 'YAxisAnnotationStrokeThickness:ab6:afh', [1, NaN], 'YAxisAnnotationTextColor:afu:afi', [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.j0 = 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.ah(h.dataContext); a.y(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; })();