igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
974 lines (973 loc) • 32.4 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 { __extends, __values } from "tslib";
import { AnnotationLayerView } from "./AnnotationLayerView";
import { Base, Point_$type, markType, runOn, delegateRemove, delegateCombine, typeCast, fromEnum, markDep } from "igniteui-react-core";
import { ImageLoader } from "igniteui-react-core";
import { PointerTooltip } from "./PointerTooltip";
import { TextBlock } from "igniteui-react-core";
import { Rectangle } from "igniteui-react-core";
import { AnnotationBadge } from "./AnnotationBadge";
import { Series } from "./Series";
import { DataContext } from "igniteui-react-core";
import { CalloutView } from "./CalloutView";
import { Size } from "igniteui-react-core";
import { Thickness } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { AxisAnnotationManager } from "./AxisAnnotationManager";
import { PointerTooltipStyle } from "./PointerTooltipStyle";
import { PointerTooltipUtils } from "./PointerTooltipUtils";
import { BrushUtil } from "igniteui-react-core";
import { stringIsNullOrEmpty, stringContains, stringReplace } from "igniteui-react-core";
import { tryParseNumber, isNaN_ } from "igniteui-react-core";
import { AnnotationLayer } from "./AnnotationLayer";
import { DependencyProperty } from "igniteui-react-core";
import { UserAnnotationTooltipLayerFrame } from "./UserAnnotationTooltipLayerFrame";
import { UserAnnotationToolTipContentUpdatingEventArgs } from "./UserAnnotationToolTipContentUpdatingEventArgs";
import { UserAnnotationLayer } from "./UserAnnotationLayer";
import { Tuple$2 } from "igniteui-react-core";
import { CalloutAnnotationWrapper } from "./CalloutAnnotationWrapper";
import { CalloutLayer } from "./CalloutLayer";
import { PropertyMetadata } from "igniteui-react-core";
/**
* @hidden
*/
var UserAnnotationToolTipLayerView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(UserAnnotationToolTipLayerView, _super);
function UserAnnotationToolTipLayerView(a) {
var _this = _super.call(this, a) || this;
_this.cp = null;
_this.cq = null;
_this.co = null;
_this.c3 = new TextBlock();
_this.c5 = new Rectangle();
_this.cn = null;
_this.c7 = null;
_this.cr = false;
_this._htmlTest = null;
_this.cp = a;
return _this;
}
UserAnnotationToolTipLayerView.prototype.a4 = function () {
_super.prototype.a4.call(this);
this.cq = new ImageLoader();
this.cn = new AnnotationBadge(this.cq);
this.htmlTest = /^[^<]*(<[\w\W]+>)[^>]*$/;
};
UserAnnotationToolTipLayerView.prototype.as = function () {
_super.prototype.as.call(this);
var a = this.co;
a.content = null;
this.co = null;
};
Object.defineProperty(UserAnnotationToolTipLayerView.prototype, "htmlTest", {
get: function () {
return this._htmlTest;
},
set: function (a) {
this._htmlTest = a;
},
enumerable: false,
configurable: true
});
UserAnnotationToolTipLayerView.prototype.cu = function (a, b, c, d, e, f) {
var g = c;
if (b.lb == "default") {
b.lb = b.cw.getDefaultTooltipTemplate();
}
var template_ = b.lb;
var context_ = d;
if (b.toolTip == null) {
return false;
}
var tooltip_ = b.toolTip;
if ((tooltip_.updateToolTip)) {
tooltip_._inPointer = true;
tooltip_.updateToolTip(context_, true);
tooltip_.setStyleProperty('position', 'relative');
tooltip_.setStyleProperty('left', '');
tooltip_.setStyleProperty('top', '');
}
g.content = b.toolTip;
var h = b.toolTip;
e.t = 0;
e.j = false;
h.setStyleProperty("pointer-events", "auto");
g.an.p.setStyleProperty("pointer-events", "auto");
this.c7 = new Thickness(1, 0, 0, 0, 0);
var i = h.findByClass("ui-tooltip-container");
if (i.length != 0) {
this.cr = true;
}
if (i.length == 0) {
i = h.findByClass("ig-tooltip-container");
}
if (i.length == 0) {
i = h.findByClass("ig-tooltip-container-background");
}
for (var k = 0; k < i.length; k++) {
var j = i[k];
j.setStyleProperty("pointer-events", "auto");
j.setStyleProperty("border-radius", e.s + "px");
var l = window.getComputedStyle(j.getNativeElement());
this.c7.top = stringIsNullOrEmpty(l.paddingTop) ? 5 : UserAnnotationToolTipLayerView.cs(l.paddingTop);
this.c7.right = stringIsNullOrEmpty(l.paddingRight) ? 5 : UserAnnotationToolTipLayerView.cs(l.paddingRight);
this.c7.bottom = stringIsNullOrEmpty(l.paddingBottom) ? 5 : UserAnnotationToolTipLayerView.cs(l.paddingBottom);
this.c7.left = stringIsNullOrEmpty(l.paddingLeft) ? 5 : UserAnnotationToolTipLayerView.cs(l.paddingLeft);
}
var m = h.findByClass("ui-chart-user-annotation-tooltip-main-content");
var n = h.findByClass("ui-chart-user-annotation-tooltip-template-content");
if (m.length > 0) {
var o = m[0];
if (e != null) {
o.setStyleProperty("height", e.aw().height + "px");
o.setStyleProperty("width", e.aw().width + "px");
e.u = this.c7.left;
e.v = this.c7.top;
var p = g.an.b;
var q = this.co.an.m();
if (q > 0) {
p.aa();
p.ab(q, q);
}
p.aa();
p.af(f);
e.ae(p);
p.z();
if (q > 0) {
p.z();
}
}
}
if (n.length != 1) {
return null;
}
var r = n[0].getNativeElement();
h.setStyleProperty("background", "transparent");
return r;
};
UserAnnotationToolTipLayerView.prototype.ct = function (a, b, c, d, e, f, g, h, i, j) {
var k = b;
if (a.lb == "default") {
a.lb = a.cw.getDefaultTooltipTemplate();
}
var template_ = a.lb;
var context_ = c;
if (a.toolTip == null) {
return false;
}
var tooltip_ = a.toolTip;
if ((tooltip_.updateToolTip)) {
tooltip_._inPointer = true;
tooltip_.updateToolTip(context_, true);
tooltip_.setStyleProperty('position', 'relative');
tooltip_.setStyleProperty('left', '');
tooltip_.setStyleProperty('top', '');
}
k.content = a.toolTip;
var l = a.toolTip;
l.setStyleProperty("pointer-events", "auto");
var m = l.findByClass("ui-tooltip-container");
if (m.length != 0) {
this.cr = true;
}
if (m.length == 0) {
m = l.findByClass("ig-tooltip-container");
}
if (m.length == 0) {
m = l.findByClass("ig-tooltip-container-background");
}
this.c7 = new Thickness(1, 0, 0, 0, 0);
var n = this.cp.ab0();
var o = n.ap;
for (var q = 0; q < m.length; q++) {
var p = m[q];
p.setStyleProperty("pointer-events", "auto");
p.setStyleProperty("border-radius", o + "px");
var r = window.getComputedStyle(p.getNativeElement());
this.c7.top = stringIsNullOrEmpty(r.paddingTop) ? 5 : UserAnnotationToolTipLayerView.cs(r.paddingTop);
this.c7.right = stringIsNullOrEmpty(r.paddingRight) ? 5 : UserAnnotationToolTipLayerView.cs(r.paddingRight);
this.c7.bottom = stringIsNullOrEmpty(r.paddingBottom) ? 5 : UserAnnotationToolTipLayerView.cs(r.paddingBottom);
this.c7.left = stringIsNullOrEmpty(r.paddingLeft) ? 5 : UserAnnotationToolTipLayerView.cs(r.paddingLeft);
}
var s = l.findByClass("ui-chart-user-annotation-tooltip-main-content");
var t = l.findByClass("ui-chart-user-annotation-tooltip-template-content");
if (s.length > 0) {
var u = s[0];
var v = k.an.b;
this.c5._visibility = 0;
this.c5.n = 0;
this.c5.o = 0;
this.c3.dataContext = d.ca();
this.c3._visibility = e._visibility;
AxisAnnotationManager.f(j, this.c3);
var w = d.a1.ag.q();
var x = d.a1.ag.s();
var y = d.a1.ag.r();
var z = d.a1.ag.p();
this.cn._visibility = f._visibility;
var aa = this.c3.al != null && this.c3.al.length > 0;
AxisAnnotationManager.e(j, this.cn, aa);
this.cn.n = 0;
this.cn.o = 0;
var ab = this.cn.a7();
var ac = d.a1.ag.ax(this.c3);
var ad = Math.max(h.width, ac.width);
d.a1.ag.z(this.c3, new Rect(0, ab.width, 0, ad, h.height), 0, 0, 0, 0);
this.c3.ao = e.ao;
AxisAnnotationManager.g(this.c5, this.c3, this.cn, 102);
if (g.i == null) {
g.i = new Thickness(1, 0, 0, 0, 0);
}
d.a1.ag.av(this.c5, this.c3, this.cn, g, new Rect(0, 0, 0, h.width, h.height), w, x, y, z);
var ae = this.co.an.m();
if (ae > 0) {
v.aa();
v.ab(ae, ae);
}
v.aa();
v.ai(this.c7.left, this.c7.top);
v.w(this.c5);
v.af(this.c3.dataContext);
v.x(this.c3);
this.cn.ag.d(v);
v.z();
if (ae > 0) {
v.z();
}
var af = Math.max(this.c3.l, this.cn.l);
u.setStyleProperty("height", af + "px");
if (j.isBadgeEnabled) {
u.setStyleProperty("width", this.cn.m + this.cn.bb.right + this.c3.m + "px");
}
else {
u.setStyleProperty("width", this.c3.m + "px");
}
}
if (t.length != 1) {
return null;
}
var ag = t[0].getNativeElement();
l.setStyleProperty("background", "transparent");
return ag;
};
UserAnnotationToolTipLayerView.prototype.c6 = function (a, b, c, d) {
var e = a;
var f = e.content;
var g = new Size(1, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);
e.a5 = 0;
e.a4 = 1.7976931348623157E+308;
if (c != null) {
var h = c.badgeSize;
var i = c.badgeMargin;
var j = this.c3.m;
e.a5 = h + 2 * i + j + this.c7.left + this.c7.right;
}
else if (d != null) {
var k = d.aw();
e.a5 = k.width + this.c7.left + this.c7.right;
}
if (this.cr) {
var l = e.an.ad(g);
e.a4 = l.height - 12;
}
var m = e.c1(new Size(1, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY));
return m;
};
UserAnnotationToolTipLayerView.prototype.c1 = function (a, b, c, d, e, f) {
var g = new PointerTooltipStyle();
if (this.f.dc != null) {
var h = this.f.dc.dw.j.i();
if (d != null) {
PointerTooltipUtils.a(h, g, d.am, d.ao, d.t, d.s);
}
else {
var i = e.outline == null ? BrushUtil.j(0, 0, 0, 0) : e.outline;
var j = this.cp.ab0();
PointerTooltipUtils.a(h, g, e.background, i, e.strokeThickness, j.ap);
}
}
var k = a;
k.aq = g;
var l = k.content;
k.cw = { $type: Point_$type, x: 0, y: 0 };
k._visibility = 0;
if (e == null) {
k.n = b - this.c7.left;
k.o = c - this.c7.top;
}
else {
if (e.isBadgeEnabled) {
k.n = b;
}
else {
k.n = b;
}
k.o = c;
}
};
UserAnnotationToolTipLayerView.prototype.cv = function () {
if (this.co == null) {
var a = new PointerTooltip();
a.b0(this.f.j8);
a.c2 = 1;
this.co = a;
}
return this.co;
};
UserAnnotationToolTipLayerView.prototype.cz = function (a) {
if (a != null) {
var b = a;
b._visibility = 1;
}
};
UserAnnotationToolTipLayerView.prototype.bj = function (a, b) {
_super.prototype.bj.call(this, a, b);
if (b) {
return;
}
var c = 0;
var d = 0;
var e = this.f.dc;
if (e != null) {
var f = e.dw.j.b8();
c += f.x;
d += f.y;
}
if (this.co == null) {
return;
}
var g = this.co.an.n();
this.co.b2(this.co.n * g + c, this.co.o * g + d);
var h = this.co.content;
if (h == null) {
return;
}
var i = h.findByClass("ui-chart-user-annotation-tooltip-main-content");
var j = h.findByClass("ui-chart-user-annotation-tooltip-template-content");
if (j.length == 1) {
this.cp.abk(j[0].getNativeElement());
var k = this.cp.aa0();
var l = this.co.an.b;
if (k != null) {
k.u = this.c7.left;
k.v = this.c7.top;
var m = this.co.an.m();
if (m > 0) {
l.aa();
l.ab(m, m);
}
l.aa();
l.af(this.cp.aa8());
k.ae(l);
l.z();
if (m > 0) {
l.z();
}
}
else {
var n = this.cp.aax();
var o = this.cp.aav();
this.cn.n = 0;
this.cn.o = 0;
this.c5.n = 0;
this.c5.o = 0;
var p = this.co.an.m();
if (p > 0) {
l.aa();
l.ab(p, p);
}
l.aa();
l.ai(this.c7.left, this.c7.top);
l.w(this.c5);
l.af(this.c3.dataContext);
l.x(this.c3);
this.cn.ag.d(l);
l.z();
if (p > 0) {
l.z();
}
}
}
};
UserAnnotationToolTipLayerView.prototype.c0 = function (a) {
this.a2();
this.cz(this.co);
if (a) {
this.co.bw();
}
};
UserAnnotationToolTipLayerView.prototype.c2 = function () {
if (this.f.dc == null) {
this.c0(true);
}
};
UserAnnotationToolTipLayerView.prototype.cx = function () {
if (this.co == null) {
var a = new PointerTooltip();
a.b0(this.f.j8);
a.c2 = 1;
this.co = a;
}
};
UserAnnotationToolTipLayerView.prototype.cy = function () {
if (this.co == null) {
return;
}
this.co._visibility = 1;
};
UserAnnotationToolTipLayerView.prototype.c4 = function (a) {
return a;
};
UserAnnotationToolTipLayerView.cs = function (a) {
if (stringContains(a, "px")) {
a = stringReplace(a, "px", "");
}
var b = 0;
var c = tryParseNumber(a, b);
b = c.p1;
return b;
};
UserAnnotationToolTipLayerView.$t = markType(UserAnnotationToolTipLayerView, 'UserAnnotationToolTipLayerView', AnnotationLayerView.$);
return UserAnnotationToolTipLayerView;
}(AnnotationLayerView));
export { UserAnnotationToolTipLayerView };
/**
* @hidden
*/
var UserAnnotationToolTipLayer = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(UserAnnotationToolTipLayer, _super);
function UserAnnotationToolTipLayer() {
var _this = _super.call(this) || this;
_this.abw = null;
_this.abx = null;
_this.aas = null;
_this.abu = null;
_this.aby = null;
_this.aau = null;
_this.aay = 0;
_this.aba = false;
_this.abq = null;
_this.aat = null;
_this.aa1 = null;
_this.abz = null;
_this.aaw = null;
_this.aa9 = false;
_this.abv = null;
_this.aa3 = null;
_this.aaz = null;
_this.aa7 = null;
_this.ab1 = null;
_this.abf = null;
_this.aa4 = null;
_this.abb = false;
_this.contentUpdating = null;
var a = new UserAnnotationTooltipLayerFrame();
var b = new UserAnnotationTooltipLayerFrame();
var c = new UserAnnotationTooltipLayerFrame();
var d = _this.km / 1000;
_this.xx = a;
_this.xw = b;
_this.xy = c;
_this.ab = UserAnnotationToolTipLayer.$;
return _this;
}
UserAnnotationToolTipLayer.prototype.bk = function () {
return new UserAnnotationToolTipLayer();
};
UserAnnotationToolTipLayer.prototype.get_eu = function () {
return true;
};
UserAnnotationToolTipLayer.prototype.ct = function () {
return new UserAnnotationToolTipLayerView(this);
};
UserAnnotationToolTipLayer.prototype.rh = function (a) {
_super.prototype.rh.call(this, a);
this.aa6 = a;
};
UserAnnotationToolTipLayer.prototype.g0 = function (a) {
if (this.aa2 == null) {
return true;
}
if (this.aa2 == a) {
return true;
}
return false;
};
UserAnnotationToolTipLayer.prototype.rq = function (a, b, c, d) {
_super.prototype.rq.call(this, a, b, c, d);
switch (b) {
case UserAnnotationToolTipLayer.$$p[1]:
case UserAnnotationToolTipLayer.$$p[2]:
this.r8(true);
break;
case UserAnnotationToolTipLayer.$$p[0]:
this.r8(true);
break;
case "SeriesViewer":
this.abm(c, d);
this.aa6.c2();
break;
}
};
UserAnnotationToolTipLayer.prototype.abm = function (a, b) {
if (a != null) {
a.axisPanelMouseOver = delegateRemove(a.axisPanelMouseOver, runOn(this, this.abo));
a.axisLabelMouseOver = delegateRemove(a.axisLabelMouseOver, runOn(this, this.abp));
a.axisLabelMouseLeave = delegateRemove(a.axisLabelMouseLeave, runOn(this, this.abn));
this.contentUpdating = delegateRemove(this.contentUpdating, runOn(a, a.rv));
}
if (b != null) {
b.axisPanelMouseOver = delegateCombine(b.axisPanelMouseOver, runOn(this, this.abo));
b.axisLabelMouseOver = delegateCombine(b.axisLabelMouseOver, runOn(this, this.abp));
b.axisLabelMouseLeave = delegateCombine(b.axisLabelMouseLeave, runOn(this, this.abn));
this.contentUpdating = delegateCombine(this.contentUpdating, runOn(b, b.rv));
}
};
UserAnnotationToolTipLayer.prototype.abo = function (a, b) {
this.abw = b.h;
};
UserAnnotationToolTipLayer.prototype.abn = function (a, b) {
};
UserAnnotationToolTipLayer.prototype.abp = function (a, b) {
var e_1, _a;
this.aba = false;
if (b.a.at.count == 0) {
return;
}
var c = b.a.a1.bg._inner[b.a.hk];
var d = b.a.ch;
var e = -1;
this.abq = null;
for (var f = 0; f < d.a.count; f++) {
var g = d.a._inner[f];
if (g == c) {
e = f;
this.abq = g;
this.aat = b.a.cg.item(f);
this.aa1 = b.a.er._inner[f];
this.abz = b.a.cf.item(f);
}
}
if (e == -1) {
return;
}
this.aaw = b.a.at._inner[e];
if (this.aaw.ag == null) {
return;
}
try {
for (var _b = __values(fromEnum(this.dc.b9)), _c = _b.next(); !_c.done; _c = _b.next()) {
var h = _c.value;
var i = typeCast(UserAnnotationLayer.$, h);
if (i == null) {
continue;
}
if (Base.equalsStatic(i.yr, this.aaw.ag)) {
this.aa4 = i;
break;
}
}
}
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;
}
}
if (this.aa4 == null) {
return;
}
this.abw = b.h;
this.abx = b.a.a1.bd._inner[b.a.hk];
this.aas = b.a.ce.item(b.a.hj);
this.aau = b.a;
this.aby = b.a.bp.bi();
this.abu = b.a.bp.bf();
this.aay = b.a.a1.ai;
this.aba = true;
this.r8(true);
};
UserAnnotationToolTipLayer.prototype.zd = function (a, b) {
if (this.aa2 == null || this.aa2 == a) {
if (!this.a1.c) {
this.r8(b);
}
}
};
UserAnnotationToolTipLayer.prototype.x4 = function (a) {
if (a == null) {
return false;
}
if (!a.eq) {
return false;
}
if (a.isValueOverlay) {
return false;
}
if (a == this) {
return false;
}
return a.hk(a.cw.b9, a.cw.ca, a.cw);
};
UserAnnotationToolTipLayer.prototype.zf = function (a, b) {
var e_2, _a;
_super.prototype.zf.call(this, a, b);
var c = a;
var d = this.abc;
c.l = 0;
c.m = null;
c.k = 0;
c.o = null;
c.n = null;
c.j = 0;
c.i = 0;
c.p = null;
var e = this.aba && isNaN_(this.aap.x);
var f = 0;
this.aaz = null;
if (this.abb) {
}
else if (e) {
if (this.aba) {
this.aaz = null;
if (this.abd(c)) {
f = 1;
}
}
else {
this.aa6.cz(this.aa6.cv());
return;
}
}
else {
this.aba = false;
this.aaw = null;
if (this.x4(this.aa2)) {
if (this.abe(this.aa2, c, d, 0)) {
f++;
}
}
else {
try {
for (var _b = __values(fromEnum(this.dc.b9)), _c = _b.next(); !_c.done; _c = _b.next()) {
var g = _c.value;
if (this.x4(g)) {
if (this.abe(g, c, d, f)) {
f++;
}
}
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
}
}
if (f == 1) {
this.aa6.cx();
}
else if (f == 0) {
this.aa9 = false;
this.aba = false;
this.aa6.cy();
}
};
UserAnnotationToolTipLayer.prototype.abd = function (a) {
this.aa3 = null;
if (this.aaw == null) {
return false;
}
if (!this.aaw.o) {
return false;
}
var b;
var c;
b = { $type: Point_$type, x: this.aas.d, y: this.aas.e };
c = this.abw;
if (isNaN_(b.x) || isNaN_(b.y)) {
return false;
}
else {
this.aa9 = true;
this.abv = c;
}
this.aa7 = this.aau.ca();
var d = this.aaw.k;
var e = d.j();
var f = e;
var g = this.aa6.cv();
var h = null;
h = new DataContext();
h.item = f;
h.series = this.aa4;
var i = this.aa6.ct(this.aa4, g, h, this.aau, this.abq, this.aat, this.aa1, this.abx, null, this.aaw);
this.ab1 = new Thickness(1, this.aau.a1.ag.q(), this.aau.a1.ag.s(), this.aau.a1.ag.r(), this.aau.a1.ag.p());
this.abl(i, f);
var j = this.aa6.c6(g, h, this.aaw, this.aaz);
var k = this.cw.b9;
var l = b;
var m = l.x;
var n = l.y;
var o = l.x;
var p = l.y;
var q = l.x;
var r = l.y;
var s = this.vt;
if (s == null) {
s = this.vz;
}
var t = this.dc.yj(this.aap);
var u = new Rect(0, b.x, b.y, j.width, j.height);
if (!isNaN_(t.x) && !(u.containsPoint(t))) {
return false;
}
this.aa3 = f;
a.m = g;
a.n = h;
a.o = i;
a.k = o;
a.l = p;
a.j = j.width;
a.i = j.height;
a.p = s;
return true;
};
UserAnnotationToolTipLayer.prototype.abe = function (a, b, c, d) {
var e_3, _a;
this.aa3 = null;
var e;
var f;
var g = this.oz(a, this.aap);
if (!g.c && !this.aa9) {
return false;
}
f = isNaN_(g.d.x) || this.aa9 ? this.abv : g.d;
e = a.ww(f, false, c);
if (isNaN_(e.x) || isNaN_(e.y)) {
if (!this.aa9) {
return false;
}
f = this.abv;
e = a.ww(this.abv, false, c);
if (isNaN_(e.x) || isNaN_(e.y)) {
return false;
}
}
else {
this.aa9 = true;
this.abv = f;
}
var h = typeCast(Tuple$2.$.specialize(CalloutAnnotationWrapper.$, CalloutView.$), a.kw(f));
var i = null;
var j = null;
if (h != null) {
i = h.c;
j = h.d;
}
if (i == null) {
return false;
}
this.abf = i.b.bn;
if (this.abf == null) {
this.abf = i.b.text;
}
var k = a.mb;
if (k == null) {
return false;
}
var l = null;
try {
for (var _b = __values(fromEnum(this.dc.b9)), _c = _b.next(); !_c.done; _c = _b.next()) {
var m = _c.value;
var n = typeCast(UserAnnotationLayer.$, m);
if (n == null) {
continue;
}
if (Base.equalsStatic(n.yr, k)) {
l = n;
break;
}
}
}
catch (e_3_1) {
e_3 = { error: e_3_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_3)
throw e_3.error;
}
}
if (l == null) {
return false;
}
this.aa4 = l;
var o = i.b.n.b;
var p = o.j();
var q = p;
var r = i.c.p;
var s = i.c.o;
var t = i.c.k - r;
var u = i.c.l - s;
var v = this.w2({ $type: Point_$type, x: t, y: u });
var w = this.aa6.cv();
var x = null;
x = new DataContext();
x.item = this.aa4;
x.series = this.aa4;
this.aaz = j.b(null);
this.aaz.x = this.abf;
this.aaz.u = 0;
this.aaz.v = 0;
var y = typeCast(CalloutLayer.$, a);
this.aa7 = y.aa3.cq();
var z = this.aa6.cu(a, l, w, x, this.aaz, this.aa7);
if (z == null) {
z = a.toolTip;
}
else {
this.abl(z, q);
}
var aa = this.aa6.c6(w, x, this.aaw, this.aaz);
var ab = this.cw.b9;
var ac = e;
var ad = this.xd.top;
var ae = this.xd.bottom;
var af = this.xd.left;
var ag = this.xd.right;
ac = this.aa6.c4(e);
var ah = ac.x;
var ai = ac.y;
var aj = ac.x;
var ak = ac.y;
var al = ac.x;
var am = ac.y;
var an = this.vt;
if (an == null) {
an = this.vz;
}
if (an == null) {
an = a.vt;
}
var ao = this.wr(this.aap);
var ap = new Rect(0, al, am, aa.width, aa.height);
if (!isNaN_(ao.x) && !(ap.containsPoint(ao))) {
return false;
}
this.aa3 = q;
b.m = w;
b.n = x;
b.o = z;
b.k = aj;
b.l = ak;
b.j = aa.width;
b.i = aa.height;
b.p = an;
return true;
};
UserAnnotationToolTipLayer.prototype.abk = function (a) {
this.abl(a, this.aa3);
};
UserAnnotationToolTipLayer.prototype.aa0 = function () {
return this.aaz;
};
UserAnnotationToolTipLayer.prototype.abl = function (a, b) {
if (this.contentUpdating == null) {
return;
}
if (a == null || b == null) {
return;
}
this.contentUpdating(this, ((function () {
var $ret = new UserAnnotationToolTipContentUpdatingEventArgs();
$ret.content = a;
$ret.annotationInfo = b;
return $ret;
})()));
};
UserAnnotationToolTipLayer.prototype.ql = function () {
this.aap = { $type: Point_$type, x: NaN, y: NaN };
this.r8(false);
this.aa6.c0(false);
};
UserAnnotationToolTipLayer.prototype.qm = function () {
this.aap = { $type: Point_$type, x: NaN, y: NaN };
this.r8(false);
this.aa6.c0(true);
};
UserAnnotationToolTipLayer.prototype.zi = function (a, b) {
_super.prototype.zi.call(this, a, b);
var c = a;
if (isNaN_(c.k) || isNaN_(c.l) || c.o == null || c.n == null) {
this.aa6.cz(this.aa6.cv());
return;
}
var d = c.k;
var e = c.l;
var f = c.j;
var g = c.i;
var h = c.m;
var i = d;
var j = e;
if (h != null) {
this.aa6.c1(h, i, j, this.aaz, this.aaw, this.ab1);
}
};
UserAnnotationToolTipLayer.prototype.gg = function () {
return true;
};
UserAnnotationToolTipLayer.prototype.get_ga = function () {
return true;
};
UserAnnotationToolTipLayer.prototype.get_f7 = function () {
return true;
};
UserAnnotationToolTipLayer.prototype.gl = function (a) {
return false;
};
UserAnnotationToolTipLayer.prototype.aa8 = function () {
return this.aa7;
};
UserAnnotationToolTipLayer.prototype.aax = function () {
return this.aaw;
};
UserAnnotationToolTipLayer.prototype.aav = function () {
return this.aau;
};
UserAnnotationToolTipLayer.prototype.ab0 = function () {
return this.abz;
};
UserAnnotationToolTipLayer.prototype.b3 = function () {
return 1;
};
UserAnnotationToolTipLayer.$t = markType(UserAnnotationToolTipLayer, 'UserAnnotationToolTipLayer', AnnotationLayer.$);
UserAnnotationToolTipLayer.$$p = markDep(DependencyProperty, PropertyMetadata, UserAnnotationToolTipLayer, 'raisePropertyChanged', ['SkipUnknownValues:abc:abr', [0, true], 'TargetSeriesName:abh:abs', [2, null], 'TargetSeries:aa2:abt', [Series.$, null]]);
return UserAnnotationToolTipLayer;
}(AnnotationLayer));
export { UserAnnotationToolTipLayer };