@abdullahjaswal/tickyr-charts-solid 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +244 -276
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4859,51 +4859,49 @@ let __tla = (async () => {
4859
4859
  handlePointerMove(e2) {
4860
4860
  let t2 = this.handle;
4861
4861
  if (t2 === null) return;
4862
- let n2 = e2.currentTarget;
4863
- if (n2 === null) return;
4864
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout, s2 = t2.extremes;
4865
- if (s2 !== null) {
4866
- let e3 = (e4) => e4 !== null && i2 >= e4.x && i2 <= e4.x + e4.width && a2 >= e4.y && a2 <= e4.y + e4.height;
4867
- if (e3(s2.high.pillBox)) {
4862
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = t2.layout, o2 = t2.extremes;
4863
+ if (o2 !== null) {
4864
+ let e3 = (e4) => e4 !== null && r2 >= e4.x && r2 <= e4.x + e4.width && i2 >= e4.y && i2 <= e4.y + e4.height;
4865
+ if (e3(o2.high.pillBox)) {
4868
4866
  this.setHover(null), this.setExtremeHover({
4869
4867
  kind: "high",
4870
- pointerX: i2,
4871
- pointerY: a2,
4872
- idx: s2.high.idx,
4873
- t: s2.high.t,
4874
- price: s2.high.price
4868
+ pointerX: r2,
4869
+ pointerY: i2,
4870
+ idx: o2.high.idx,
4871
+ t: o2.high.t,
4872
+ price: o2.high.price
4875
4873
  }), this.repaintDynamicWith(null, performance.now());
4876
4874
  return;
4877
4875
  }
4878
- if (e3(s2.low.pillBox)) {
4876
+ if (e3(o2.low.pillBox)) {
4879
4877
  this.setHover(null), this.setExtremeHover({
4880
4878
  kind: "low",
4881
- pointerX: i2,
4882
- pointerY: a2,
4883
- idx: s2.low.idx,
4884
- t: s2.low.t,
4885
- price: s2.low.price
4879
+ pointerX: r2,
4880
+ pointerY: i2,
4881
+ idx: o2.low.idx,
4882
+ t: o2.low.t,
4883
+ price: o2.low.price
4886
4884
  }), this.repaintDynamicWith(null, performance.now());
4887
4885
  return;
4888
4886
  }
4889
4887
  }
4890
- if (i2 < o2.innerLeft || i2 > o2.innerRight || a2 < o2.innerTop || a2 > o2.innerBottom) {
4888
+ if (r2 < a2.innerLeft || r2 > a2.innerRight || i2 < a2.innerTop || i2 > a2.innerBottom) {
4891
4889
  this.setHover(null), this.setExtremeHover(null), this.repaintDynamicWith(null, performance.now());
4892
4890
  return;
4893
4891
  }
4894
4892
  this.setExtremeHover(null);
4895
- let c2 = this.props.crosshairSnap ?? "data", l2 = i2, u2 = a2, d2 = -1, f2 = ho(i2, o2), p2 = o2.yScale.fromPx(a2), m2 = this.stackedLayout === null ? this.series.values : this.stackedLayout.tops[0];
4896
- c2 === "data" && this.series.length > 0 ? (d2 = Ir(this.series.times, f2), f2 = X(this.series.times, d2), p2 = X(m2, d2), l2 = mo(f2, o2), u2 = o2.yScale.toPx(p2)) : c2 === "x-axis" && this.series.length > 0 && (d2 = Ir(this.series.times, f2), f2 = X(this.series.times, d2), l2 = mo(f2, o2));
4897
- let h2 = {
4898
- pointerX: i2,
4899
- pointerY: a2,
4900
- snapX: l2,
4901
- snapY: u2,
4902
- idx: d2,
4903
- t: f2,
4904
- value: p2
4893
+ let s2 = this.props.crosshairSnap ?? "data", c2 = r2, l2 = i2, u2 = -1, d2 = ho(r2, a2), f2 = a2.yScale.fromPx(i2), p2 = this.stackedLayout === null ? this.series.values : this.stackedLayout.tops[0];
4894
+ s2 === "data" && this.series.length > 0 ? (u2 = Ir(this.series.times, d2), d2 = X(this.series.times, u2), f2 = X(p2, u2), c2 = mo(d2, a2), l2 = a2.yScale.toPx(f2)) : s2 === "x-axis" && this.series.length > 0 && (u2 = Ir(this.series.times, d2), d2 = X(this.series.times, u2), c2 = mo(d2, a2));
4895
+ let m2 = {
4896
+ pointerX: r2,
4897
+ pointerY: i2,
4898
+ snapX: c2,
4899
+ snapY: l2,
4900
+ idx: u2,
4901
+ t: d2,
4902
+ value: f2
4905
4903
  };
4906
- this.setHover(h2), this.repaintDynamicWith(h2, performance.now());
4904
+ this.setHover(m2), this.repaintDynamicWith(m2, performance.now());
4907
4905
  }
4908
4906
  handlePointerLeave() {
4909
4907
  let e2 = this.handle;
@@ -8743,111 +8741,109 @@ ${G2 ?? ""}`;
8743
8741
  handlePointerMove(e2) {
8744
8742
  let t2 = this.handle;
8745
8743
  if (t2 === null) return;
8746
- let n2 = e2.currentTarget;
8747
- if (n2 === null) return;
8748
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout;
8744
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = t2.layout;
8749
8745
  if (this.dividerDrag !== null) {
8750
- if (Math.abs(a2 - this.dividerDrag.startPointerY) > 2 && (this.dividerDrag.moved = true), this.dividerDrag.availableHeight > 0) {
8751
- let e3 = (this.dividerDrag.startPointerY - a2) / this.dividerDrag.availableHeight, t3 = this.dividerDrag.startRatio + e3;
8746
+ if (Math.abs(i2 - this.dividerDrag.startPointerY) > 2 && (this.dividerDrag.moved = true), this.dividerDrag.availableHeight > 0) {
8747
+ let e3 = (this.dividerDrag.startPointerY - i2) / this.dividerDrag.availableHeight, t3 = this.dividerDrag.startRatio + e3;
8752
8748
  t3 < 0.05 && (t3 = 0.05), t3 > 0.6 && (t3 = 0.6), t3 !== this.volumeHeightRatio && (this.volumeHeightRatio = t3, this.runStaticDraw());
8753
8749
  }
8754
8750
  return;
8755
8751
  }
8756
- if ((this.props.volumeResizable ?? true) && o2.volumePane !== null) {
8757
- let e3 = o2.volumePane.dividerY, t3 = Math.abs(a2 - e3) <= 5;
8752
+ if ((this.props.volumeResizable ?? true) && a2.volumePane !== null) {
8753
+ let e3 = a2.volumePane.dividerY, t3 = Math.abs(i2 - e3) <= 5;
8758
8754
  t3 !== this.overDivider && (this.overDivider = t3, this.callbacks.onOverDividerChange(t3));
8759
8755
  } else this.overDivider && (this.overDivider = false, this.callbacks.onOverDividerChange(false));
8760
- let s2 = t2.extremes;
8761
- if (s2 !== null) {
8762
- let e3 = (e4) => e4 !== null && i2 >= e4.x && i2 <= e4.x + e4.width && a2 >= e4.y && a2 <= e4.y + e4.height;
8763
- if (e3(s2.high.pillBox)) {
8756
+ let o2 = t2.extremes;
8757
+ if (o2 !== null) {
8758
+ let e3 = (e4) => e4 !== null && r2 >= e4.x && r2 <= e4.x + e4.width && i2 >= e4.y && i2 <= e4.y + e4.height;
8759
+ if (e3(o2.high.pillBox)) {
8764
8760
  this.setHover(null), this.setExtremeHover({
8765
8761
  kind: "high",
8766
- pointerX: i2,
8767
- pointerY: a2,
8768
- idx: s2.high.idx,
8769
- t: s2.high.t,
8770
- price: s2.high.price
8762
+ pointerX: r2,
8763
+ pointerY: i2,
8764
+ idx: o2.high.idx,
8765
+ t: o2.high.t,
8766
+ price: o2.high.price
8771
8767
  }), this.repaintDynamic();
8772
8768
  return;
8773
8769
  }
8774
- if (e3(s2.low.pillBox)) {
8770
+ if (e3(o2.low.pillBox)) {
8775
8771
  this.setHover(null), this.setExtremeHover({
8776
8772
  kind: "low",
8777
- pointerX: i2,
8778
- pointerY: a2,
8779
- idx: s2.low.idx,
8780
- t: s2.low.t,
8781
- price: s2.low.price
8773
+ pointerX: r2,
8774
+ pointerY: i2,
8775
+ idx: o2.low.idx,
8776
+ t: o2.low.t,
8777
+ price: o2.low.price
8782
8778
  }), this.repaintDynamic();
8783
8779
  return;
8784
8780
  }
8785
8781
  }
8786
- let c2 = a2 >= o2.innerTop && a2 <= (o2.volumePane?.top ?? o2.innerBottom), l2 = o2.volumePane !== null && a2 >= o2.volumePane.top && a2 <= o2.volumePane.bottom;
8787
- if (i2 < o2.innerLeft || i2 > o2.innerRight || !c2 && !l2) {
8782
+ let s2 = i2 >= a2.innerTop && i2 <= (a2.volumePane?.top ?? a2.innerBottom), c2 = a2.volumePane !== null && i2 >= a2.volumePane.top && i2 <= a2.volumePane.bottom;
8783
+ if (r2 < a2.innerLeft || r2 > a2.innerRight || !s2 && !c2) {
8788
8784
  this.setHover(null), this.setExtremeHover(null), this.repaintDynamic();
8789
8785
  return;
8790
8786
  }
8791
8787
  if (this.setExtremeHover(null), this.panDrag !== null) {
8792
- let e3 = this.panDrag.startWindow.endMs - this.panDrag.startWindow.startMs, t3 = o2.innerRight - o2.innerLeft, n3 = -((i2 - this.panDrag.startPx) / t3) * e3, r3 = {
8788
+ let e3 = this.panDrag.startWindow.endMs - this.panDrag.startWindow.startMs, t3 = a2.innerRight - a2.innerLeft, n3 = -((r2 - this.panDrag.startPx) / t3) * e3, i3 = {
8793
8789
  startMs: this.panDrag.startWindow.startMs + n3,
8794
8790
  endMs: this.panDrag.startWindow.endMs + n3
8795
- }, a3 = this.arr;
8796
- if (a3.length > 0) {
8797
- let e4 = X(a3.times, 0), t4 = X(a3.times, a3.length - 1);
8798
- r3.startMs < e4 && (r3.endMs += e4 - r3.startMs, r3.startMs = e4), r3.endMs > t4 && (r3.startMs -= r3.endMs - t4, r3.endMs = t4);
8791
+ }, o3 = this.arr;
8792
+ if (o3.length > 0) {
8793
+ let e4 = X(o3.times, 0), t4 = X(o3.times, o3.length - 1);
8794
+ i3.startMs < e4 && (i3.endMs += e4 - i3.startMs, i3.startMs = e4), i3.endMs > t4 && (i3.startMs -= i3.endMs - t4, i3.endMs = t4);
8799
8795
  }
8800
- this.zoomWindow = r3, this.resolveDerived(), this.runStaticDraw();
8796
+ this.zoomWindow = i3, this.resolveDerived(), this.runStaticDraw();
8801
8797
  return;
8802
8798
  }
8803
- let u2 = this.visibleArr;
8804
- if (u2.length === 0) return;
8805
- let d2 = o2.xScale.fromPx(i2), f2 = Ir(u2.times, d2), p2 = X(u2.times, f2), m2 = X(u2.opens, f2), h2 = X(u2.highs, f2), g2 = X(u2.lows, f2), _2 = X(u2.closes, f2), v2 = u2.volumes === null ? NaN : X(u2.volumes, f2), y2 = this.props.dojiMinBodyHeight ?? 1.5, b2 = o2.yScale.toPx(Math.max(m2, _2)), x2 = o2.yScale.toPx(Math.min(m2, _2)) - b2 < y2 ? "doji" : _2 >= m2 ? "up" : "down", S2 = {
8806
- pointerX: i2,
8807
- pointerY: a2,
8808
- snapX: o2.xScale.toPx(p2),
8809
- snapY: o2.yScale.toPx(_2),
8810
- idx: f2,
8811
- t: p2,
8812
- o: m2,
8813
- h: h2,
8814
- l: g2,
8815
- c: _2,
8816
- v: v2,
8817
- direction: x2,
8818
- pane: l2 ? "volume" : "price"
8799
+ let l2 = this.visibleArr;
8800
+ if (l2.length === 0) return;
8801
+ let u2 = a2.xScale.fromPx(r2), d2 = Ir(l2.times, u2), f2 = X(l2.times, d2), p2 = X(l2.opens, d2), m2 = X(l2.highs, d2), h2 = X(l2.lows, d2), g2 = X(l2.closes, d2), _2 = l2.volumes === null ? NaN : X(l2.volumes, d2), v2 = this.props.dojiMinBodyHeight ?? 1.5, y2 = a2.yScale.toPx(Math.max(p2, g2)), b2 = a2.yScale.toPx(Math.min(p2, g2)) - y2 < v2 ? "doji" : g2 >= p2 ? "up" : "down", x2 = {
8802
+ pointerX: r2,
8803
+ pointerY: i2,
8804
+ snapX: a2.xScale.toPx(f2),
8805
+ snapY: a2.yScale.toPx(g2),
8806
+ idx: d2,
8807
+ t: f2,
8808
+ o: p2,
8809
+ h: m2,
8810
+ l: h2,
8811
+ c: g2,
8812
+ v: _2,
8813
+ direction: b2,
8814
+ pane: c2 ? "volume" : "price"
8819
8815
  };
8820
- this.setHover(S2), this.crosshairAlpha < 1 && this.kickCrosshairFade(1);
8821
- let C2 = null, w2 = -1, T2 = Infinity;
8816
+ this.setHover(x2), this.crosshairAlpha < 1 && this.kickCrosshairFade(1);
8817
+ let S2 = null, C2 = -1, w2 = Infinity;
8822
8818
  if (this.markerQuadtree !== null) {
8823
- let e3 = this.markerQuadtree.nearest(i2, a2);
8819
+ let e3 = this.markerQuadtree.nearest(r2, i2);
8824
8820
  if (e3 !== null) {
8825
- let t3 = i2 - e3.x, n3 = a2 - e3.y, r3 = Math.sqrt(t3 * t3 + n3 * n3);
8826
- if (r3 < 14) {
8821
+ let t3 = r2 - e3.x, n3 = i2 - e3.y, a3 = Math.sqrt(t3 * t3 + n3 * n3);
8822
+ if (a3 < 14) {
8827
8823
  let t4 = e3.id >>> 24 & 255, n4 = e3.id & 16777215;
8828
- t4 === 0 && this.props.signalTooltip !== false ? (C2 = "signal", w2 = n4, T2 = r3) : t4 === 1 && this.props.eventTooltip !== false && (C2 = "event", w2 = n4, T2 = r3);
8824
+ t4 === 0 && this.props.signalTooltip !== false ? (S2 = "signal", C2 = n4, w2 = a3) : t4 === 1 && this.props.eventTooltip !== false && (S2 = "event", C2 = n4, w2 = a3);
8829
8825
  }
8830
8826
  }
8831
8827
  }
8832
- let E2 = this.props.orders;
8833
- if (this.props.orderTooltip !== false && E2 !== void 0 && E2.length > 0) for (let e3 = 0; e3 < E2.length; e3++) {
8834
- let t3 = E2[e3], n3 = o2.yScale.toPx(t3.entryPrice), r3 = Math.abs(a2 - n3);
8835
- r3 < 14 && r3 < T2 && (C2 = "order", w2 = e3, T2 = r3);
8828
+ let T2 = this.props.orders;
8829
+ if (this.props.orderTooltip !== false && T2 !== void 0 && T2.length > 0) for (let e3 = 0; e3 < T2.length; e3++) {
8830
+ let t3 = T2[e3], n3 = a2.yScale.toPx(t3.entryPrice), r3 = Math.abs(i2 - n3);
8831
+ r3 < 14 && r3 < w2 && (S2 = "order", C2 = e3, w2 = r3);
8836
8832
  }
8837
- let D2 = this.props.position;
8838
- if (this.props.positionTooltip !== false && D2 !== void 0) {
8839
- let e3 = o2.yScale.toPx(D2.entryPrice), t3 = Math.abs(a2 - e3);
8840
- t3 < 14 && t3 < T2 && (C2 = "position", w2 = -1, T2 = t3);
8833
+ let E2 = this.props.position;
8834
+ if (this.props.positionTooltip !== false && E2 !== void 0) {
8835
+ let e3 = a2.yScale.toPx(E2.entryPrice), t3 = Math.abs(i2 - e3);
8836
+ t3 < 14 && t3 < w2 && (S2 = "position", C2 = -1, w2 = t3);
8841
8837
  }
8842
- if (C2 === null ? this.markerHover !== null && this.setMarkerHover(null) : this.setMarkerHover({
8843
- kind: C2,
8844
- idx: w2,
8845
- pointerX: i2,
8846
- pointerY: a2
8838
+ if (S2 === null ? this.markerHover !== null && this.setMarkerHover(null) : this.setMarkerHover({
8839
+ kind: S2,
8840
+ idx: C2,
8841
+ pointerX: r2,
8842
+ pointerY: i2
8847
8843
  }), this.armedTool === null) {
8848
8844
  let e3 = this.props.drawings;
8849
8845
  if (e3 !== void 0 && e3.length > 0) {
8850
- let t3 = Ks(e3, i2, a2, this.makeDrawCtx(o2));
8846
+ let t3 = Ks(e3, r2, i2, this.makeDrawCtx(a2));
8851
8847
  this.setHoverDrawingId(t3?.id);
8852
8848
  } else this.hoverDrawingId !== void 0 && this.setHoverDrawingId(void 0);
8853
8849
  }
@@ -8868,27 +8864,23 @@ ${G2 ?? ""}`;
8868
8864
  if (t2 === null) return;
8869
8865
  let n2 = this.arr;
8870
8866
  if (n2.length < 2) return;
8871
- let r2 = e2.currentTarget;
8872
- if (r2 === null) return;
8873
- let i2 = r2.getBoundingClientRect(), a2 = e2.clientX - i2.left, o2 = t2.layout;
8874
- if (a2 < o2.innerLeft || a2 > o2.innerRight) return;
8867
+ let r2 = this.staticCanvas.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = t2.layout;
8868
+ if (i2 < a2.innerLeft || i2 > a2.innerRight) return;
8875
8869
  e2.preventDefault();
8876
- let s2 = this.zoomWindow ?? {
8870
+ let o2 = this.zoomWindow ?? {
8877
8871
  startMs: X(n2.times, 0),
8878
8872
  endMs: X(n2.times, n2.length - 1)
8879
- }, c2 = e2.deltaY < 0 ? 0.85 : 1.18, l2 = o2.xScale.fromPx(a2), u2 = (s2.endMs - s2.startMs) * c2, d2 = (l2 - s2.startMs) / Math.max(1, s2.endMs - s2.startMs), f2 = {
8880
- startMs: l2 - d2 * u2,
8881
- endMs: l2 + (1 - d2) * u2
8882
- }, p2 = X(n2.times, 0), m2 = X(n2.times, n2.length - 1);
8883
- f2.endMs - f2.startMs >= m2 - p2 ? this.zoomWindow = null : (f2.startMs < p2 && (f2.endMs += p2 - f2.startMs, f2.startMs = p2), f2.endMs > m2 && (f2.startMs -= f2.endMs - m2, f2.endMs = m2), this.zoomWindow = f2), this.resolveDerived(), this.runStaticDraw();
8873
+ }, s2 = e2.deltaY < 0 ? 0.85 : 1.18, c2 = a2.xScale.fromPx(i2), l2 = (o2.endMs - o2.startMs) * s2, u2 = (c2 - o2.startMs) / Math.max(1, o2.endMs - o2.startMs), d2 = {
8874
+ startMs: c2 - u2 * l2,
8875
+ endMs: c2 + (1 - u2) * l2
8876
+ }, f2 = X(n2.times, 0), p2 = X(n2.times, n2.length - 1);
8877
+ d2.endMs - d2.startMs >= p2 - f2 ? this.zoomWindow = null : (d2.startMs < f2 && (d2.endMs += f2 - d2.startMs, d2.startMs = f2), d2.endMs > p2 && (d2.startMs -= d2.endMs - p2, d2.endMs = p2), this.zoomWindow = d2), this.resolveDerived(), this.runStaticDraw();
8884
8878
  }
8885
8879
  handlePointerDown(e2) {
8886
8880
  if (this.disposed) return;
8887
8881
  let t2 = this.handle;
8888
8882
  if (t2 === null) return;
8889
- let n2 = e2.currentTarget;
8890
- if (n2 === null) return;
8891
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout;
8883
+ let n2 = this.staticCanvas, r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout;
8892
8884
  if ((this.props.volumeResizable ?? true) && o2.volumePane !== null) {
8893
8885
  let t3 = o2.volumePane.dividerY;
8894
8886
  if (Math.abs(a2 - t3) <= 5) {
@@ -10432,40 +10424,38 @@ ${G2 ?? ""}`;
10432
10424
  handlePointerMove(e2) {
10433
10425
  let t2 = this.handle;
10434
10426
  if (t2 === null || this.totalPointCount() === 0 || this.quadtree === null) return;
10435
- let n2 = e2.currentTarget;
10436
- if (n2 === null) return;
10437
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout;
10438
- if (i2 < o2.innerLeft || i2 > o2.innerRight || a2 < o2.innerTop || a2 > o2.innerBottom) {
10427
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = t2.layout;
10428
+ if (r2 < a2.innerLeft || r2 > a2.innerRight || i2 < a2.innerTop || i2 > a2.innerBottom) {
10439
10429
  this.setHover(null), Il(t2, null, this.dynCfg);
10440
10430
  return;
10441
10431
  }
10442
- let s2 = this.quadtree.nearest(i2, a2);
10443
- if (s2 === null) {
10432
+ let o2 = this.quadtree.nearest(r2, i2);
10433
+ if (o2 === null) {
10444
10434
  this.setHover(null), Il(t2, null, this.dynCfg);
10445
10435
  return;
10446
10436
  }
10447
- let c2 = s2.id;
10448
- if (c2 >= this.flatSeriesIdx.length) {
10437
+ let s2 = o2.id;
10438
+ if (s2 >= this.flatSeriesIdx.length) {
10449
10439
  this.setHover(null), Il(t2, null, this.dynCfg);
10450
10440
  return;
10451
10441
  }
10452
- let l2 = this.flatSeriesIdx[c2], u2 = this.flatPointIdx[c2], d2 = this.seriesList[l2];
10453
- if (d2 === void 0 || u2 >= d2.series.length) {
10442
+ let c2 = this.flatSeriesIdx[s2], l2 = this.flatPointIdx[s2], u2 = this.seriesList[c2];
10443
+ if (u2 === void 0 || l2 >= u2.series.length) {
10454
10444
  this.setHover(null), Il(t2, null, this.dynCfg);
10455
10445
  return;
10456
10446
  }
10457
- let f2 = d2.series, p2 = X(f2.xs, u2), m2 = X(f2.ys, u2), h2 = f2.sizes === null ? null : X(f2.sizes, u2), g2 = {
10458
- pointerX: i2,
10459
- pointerY: a2,
10460
- snapX: o2.xScale.toPx(p2),
10461
- snapY: o2.yScale.toPx(m2),
10462
- seriesIdx: l2,
10463
- idx: u2,
10464
- x: p2,
10465
- y: m2,
10466
- size: h2
10447
+ let d2 = u2.series, f2 = X(d2.xs, l2), p2 = X(d2.ys, l2), m2 = d2.sizes === null ? null : X(d2.sizes, l2), h2 = {
10448
+ pointerX: r2,
10449
+ pointerY: i2,
10450
+ snapX: a2.xScale.toPx(f2),
10451
+ snapY: a2.yScale.toPx(p2),
10452
+ seriesIdx: c2,
10453
+ idx: l2,
10454
+ x: f2,
10455
+ y: p2,
10456
+ size: m2
10467
10457
  };
10468
- this.setHover(g2), Il(t2, g2, this.dynCfg);
10458
+ this.setHover(h2), Il(t2, h2, this.dynCfg);
10469
10459
  }
10470
10460
  handlePointerLeave() {
10471
10461
  this.setHover(null), this.handle !== null && Il(this.handle, null, this.dynCfg);
@@ -11279,30 +11269,28 @@ ${G2 ?? ""}`;
11279
11269
  handlePointerMove(e2) {
11280
11270
  let t2 = this.handle;
11281
11271
  if (t2 === null || this.binCount === 0) return;
11282
- let n2 = e2.currentTarget;
11283
- if (n2 === null) return;
11284
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout;
11285
- if (i2 < o2.innerLeft || i2 > o2.innerRight || a2 < o2.innerTop || a2 > o2.innerBottom) {
11272
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = t2.layout;
11273
+ if (r2 < a2.innerLeft || r2 > a2.innerRight || i2 < a2.innerTop || i2 > a2.innerBottom) {
11286
11274
  this.setHover(null), mu(t2, null, this.dynCfg);
11287
11275
  return;
11288
11276
  }
11289
- let s2 = o2.xScale.fromPx(i2), c2 = hu(this.edges, this.binCount, s2);
11290
- if (c2 < 0) {
11277
+ let o2 = a2.xScale.fromPx(r2), s2 = hu(this.edges, this.binCount, o2);
11278
+ if (s2 < 0) {
11291
11279
  this.setHover(null), mu(t2, null, this.dynCfg);
11292
11280
  return;
11293
11281
  }
11294
- let l2 = X(this.edges, c2), u2 = X(this.edges, c2 + 1), d2 = X(this.yValues, c2), f2 = this.counts[c2], p2 = {
11295
- pointerX: i2,
11296
- pointerY: a2,
11297
- snapX: o2.xScale.toPx((l2 + u2) / 2),
11298
- snapY: o2.yScale.toPx(d2),
11299
- binIdx: c2,
11300
- binStart: l2,
11301
- binEnd: u2,
11302
- count: f2,
11303
- value: d2
11282
+ let c2 = X(this.edges, s2), l2 = X(this.edges, s2 + 1), u2 = X(this.yValues, s2), d2 = this.counts[s2], f2 = {
11283
+ pointerX: r2,
11284
+ pointerY: i2,
11285
+ snapX: a2.xScale.toPx((c2 + l2) / 2),
11286
+ snapY: a2.yScale.toPx(u2),
11287
+ binIdx: s2,
11288
+ binStart: c2,
11289
+ binEnd: l2,
11290
+ count: d2,
11291
+ value: u2
11304
11292
  };
11305
- this.setHover(p2), mu(t2, p2, this.dynCfg);
11293
+ this.setHover(f2), mu(t2, f2, this.dynCfg);
11306
11294
  }
11307
11295
  handlePointerLeave() {
11308
11296
  this.setHover(null), this.handle !== null && mu(this.handle, null, this.dynCfg);
@@ -11928,25 +11916,23 @@ ${G2 ?? ""}`;
11928
11916
  handlePointerMove(e2) {
11929
11917
  let t2 = this.handle;
11930
11918
  if (t2 === null || this.matrix.length === 0) return;
11931
- let n2 = e2.currentTarget;
11932
- if (n2 === null) return;
11933
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout, s2 = nd(o2, i2, a2);
11934
- if (s2 === null) {
11919
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = t2.layout, o2 = nd(a2, r2, i2);
11920
+ if (o2 === null) {
11935
11921
  this.setHover(null), td(t2, null, this.dynCfg);
11936
11922
  return;
11937
11923
  }
11938
- let c2 = s2.row * o2.cols + s2.col, l2 = this.matrix.nullMask !== null && this.matrix.nullMask[c2] === 1 ? null : X(this.matrix.values, c2), u2 = this.matrix.rowLabels === null ? String(s2.row) : this.matrix.rowLabels[s2.row], d2 = this.matrix.colLabels === null ? String(s2.col) : this.matrix.colLabels[s2.col], f2 = {
11939
- pointerX: i2,
11940
- pointerY: a2,
11941
- snapX: o2.innerLeft + (s2.col + 0.5) * o2.cellWidthPx,
11942
- snapY: o2.innerTop + (s2.row + 0.5) * o2.cellHeightPx,
11943
- row: s2.row,
11944
- col: s2.col,
11945
- value: l2,
11946
- rowLabel: u2,
11947
- colLabel: d2
11924
+ let s2 = o2.row * a2.cols + o2.col, c2 = this.matrix.nullMask !== null && this.matrix.nullMask[s2] === 1 ? null : X(this.matrix.values, s2), l2 = this.matrix.rowLabels === null ? String(o2.row) : this.matrix.rowLabels[o2.row], u2 = this.matrix.colLabels === null ? String(o2.col) : this.matrix.colLabels[o2.col], d2 = {
11925
+ pointerX: r2,
11926
+ pointerY: i2,
11927
+ snapX: a2.innerLeft + (o2.col + 0.5) * a2.cellWidthPx,
11928
+ snapY: a2.innerTop + (o2.row + 0.5) * a2.cellHeightPx,
11929
+ row: o2.row,
11930
+ col: o2.col,
11931
+ value: c2,
11932
+ rowLabel: l2,
11933
+ colLabel: u2
11948
11934
  };
11949
- this.setHover(f2), td(t2, f2, this.dynCfg);
11935
+ this.setHover(d2), td(t2, d2, this.dynCfg);
11950
11936
  }
11951
11937
  handlePointerLeave() {
11952
11938
  this.setHover(null), this.handle !== null && td(this.handle, null, this.dynCfg);
@@ -12528,29 +12514,27 @@ ${G2 ?? ""}`;
12528
12514
  handlePointerMove(e2) {
12529
12515
  let t2 = this.handle;
12530
12516
  if (t2 === null || this.series.bidPrices.length === 0 && this.series.askPrices.length === 0) return;
12531
- let n2 = e2.currentTarget;
12532
- if (n2 === null) return;
12533
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout;
12534
- if (i2 < o2.innerLeft || i2 > o2.innerRight || a2 < o2.innerTop || a2 > o2.innerBottom) {
12517
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = t2.layout;
12518
+ if (r2 < a2.innerLeft || r2 > a2.innerRight || i2 < a2.innerTop || i2 > a2.innerBottom) {
12535
12519
  this.setHover(null), Dd(t2, null, this.dynCfg);
12536
12520
  return;
12537
12521
  }
12538
- let s2 = o2.xScale.fromPx(i2), c2 = s2 <= o2.midPrice ? "bid" : "ask", l2 = c2 === "bid" ? this.series.bidPrices : this.series.askPrices, u2 = c2 === "bid" ? this.series.bidCumulative : this.series.askCumulative, d2 = c2 === "bid" ? this.series.bidSizes : this.series.askSizes, f2 = Od(l2, u2, l2.length, s2, c2);
12539
- if (f2 === null) {
12522
+ let o2 = a2.xScale.fromPx(r2), s2 = o2 <= a2.midPrice ? "bid" : "ask", c2 = s2 === "bid" ? this.series.bidPrices : this.series.askPrices, l2 = s2 === "bid" ? this.series.bidCumulative : this.series.askCumulative, u2 = s2 === "bid" ? this.series.bidSizes : this.series.askSizes, d2 = Od(c2, l2, c2.length, o2, s2);
12523
+ if (d2 === null) {
12540
12524
  this.setHover(null), Dd(t2, null, this.dynCfg);
12541
12525
  return;
12542
12526
  }
12543
- let p2 = this.cumulative ? X(u2, f2.idx) : X(d2, f2.idx), m2 = {
12544
- pointerX: i2,
12545
- pointerY: a2,
12546
- snapX: o2.xScale.toPx(X(l2, f2.idx)),
12547
- snapY: o2.yScale.toPx(p2),
12548
- side: c2,
12549
- price: s2,
12550
- cumulativeVolume: p2,
12551
- pctFromMid: Number.isFinite(o2.midPrice) && o2.midPrice !== 0 ? (s2 - o2.midPrice) / o2.midPrice : 0
12527
+ let f2 = this.cumulative ? X(l2, d2.idx) : X(u2, d2.idx), p2 = {
12528
+ pointerX: r2,
12529
+ pointerY: i2,
12530
+ snapX: a2.xScale.toPx(X(c2, d2.idx)),
12531
+ snapY: a2.yScale.toPx(f2),
12532
+ side: s2,
12533
+ price: o2,
12534
+ cumulativeVolume: f2,
12535
+ pctFromMid: Number.isFinite(a2.midPrice) && a2.midPrice !== 0 ? (o2 - a2.midPrice) / a2.midPrice : 0
12552
12536
  };
12553
- this.setHover(m2), Dd(t2, m2, this.dynCfg);
12537
+ this.setHover(p2), Dd(t2, p2, this.dynCfg);
12554
12538
  }
12555
12539
  handlePointerLeave() {
12556
12540
  this.setHover(null), this.handle !== null && Dd(this.handle, null, this.dynCfg);
@@ -13122,25 +13106,23 @@ ${G2 ?? ""}`;
13122
13106
  handlePointerMove(e2) {
13123
13107
  let t2 = this.handle;
13124
13108
  if (t2 === null || this.resolvedSeries.length === 0) return;
13125
- let n2 = e2.currentTarget;
13126
- if (n2 === null) return;
13127
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = tf(t2.layout, this.startAngles, this.endAngles, this.resolvedSeries.length, i2, a2);
13128
- if (o2 < 0) {
13109
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = tf(t2.layout, this.startAngles, this.endAngles, this.resolvedSeries.length, r2, i2);
13110
+ if (a2 < 0) {
13129
13111
  this.setHover(null), ef(t2, null, this.dynCfg);
13130
13112
  return;
13131
13113
  }
13132
- let s2 = (X(this.startAngles, o2) + X(this.endAngles, o2)) / 2, c2 = (t2.layout.innerR + t2.layout.outerR) / 2, l2 = t2.layout.cx + c2 * Math.cos(s2), u2 = t2.layout.cy + c2 * Math.sin(s2), d2 = this.resolvedSeries.values[o2], f2 = this.resolvedSeries.names[o2], p2 = this.resolvedSeries.totalValue, m2 = {
13133
- pointerX: i2,
13134
- pointerY: a2,
13135
- snapX: l2,
13136
- snapY: u2,
13137
- idx: o2,
13138
- name: f2,
13139
- value: d2,
13140
- percent: p2 > 0 ? d2 / p2 : 0,
13141
- color: this.sliceColors[o2] ?? "rgba(128,128,128,1)"
13114
+ let o2 = (X(this.startAngles, a2) + X(this.endAngles, a2)) / 2, s2 = (t2.layout.innerR + t2.layout.outerR) / 2, c2 = t2.layout.cx + s2 * Math.cos(o2), l2 = t2.layout.cy + s2 * Math.sin(o2), u2 = this.resolvedSeries.values[a2], d2 = this.resolvedSeries.names[a2], f2 = this.resolvedSeries.totalValue, p2 = {
13115
+ pointerX: r2,
13116
+ pointerY: i2,
13117
+ snapX: c2,
13118
+ snapY: l2,
13119
+ idx: a2,
13120
+ name: d2,
13121
+ value: u2,
13122
+ percent: f2 > 0 ? u2 / f2 : 0,
13123
+ color: this.sliceColors[a2] ?? "rgba(128,128,128,1)"
13142
13124
  };
13143
- this.setHover(m2), ef(t2, m2, this.dynCfg);
13125
+ this.setHover(p2), ef(t2, p2, this.dynCfg);
13144
13126
  }
13145
13127
  handlePointerLeave() {
13146
13128
  this.setHover(null), this.handle !== null && ef(this.handle, null, this.dynCfg);
@@ -13952,25 +13934,23 @@ ${G2 ?? ""}`;
13952
13934
  handlePointerMove(e2) {
13953
13935
  let t2 = this.handle;
13954
13936
  if (t2 === null || this.hierarchy.length === 0) return;
13955
- let n2 = e2.currentTarget;
13956
- if (n2 === null) return;
13957
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = Bf(this.hierarchy, t2.layout, i2, a2, this.resolvedViewMode);
13958
- if (o2 < 0) {
13937
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = Bf(this.hierarchy, t2.layout, r2, i2, this.resolvedViewMode);
13938
+ if (a2 < 0) {
13959
13939
  this.setHover(null), zf(t2, null, this.dynCfg);
13960
13940
  return;
13961
13941
  }
13962
- let s2 = this.hierarchy.values[o2], c2 = this.hierarchy.values[this.rootIdx], l2 = {
13963
- pointerX: i2,
13964
- pointerY: a2,
13965
- idx: o2,
13966
- name: this.hierarchy.names[o2],
13967
- value: s2,
13968
- percent: c2 > 0 ? s2 / c2 : 0,
13969
- depth: this.hierarchy.depths[o2],
13970
- path: Af(this.hierarchy, o2),
13971
- color: this.nodeColors[o2] ?? "rgba(128,128,128,1)"
13942
+ let o2 = this.hierarchy.values[a2], s2 = this.hierarchy.values[this.rootIdx], c2 = {
13943
+ pointerX: r2,
13944
+ pointerY: i2,
13945
+ idx: a2,
13946
+ name: this.hierarchy.names[a2],
13947
+ value: o2,
13948
+ percent: s2 > 0 ? o2 / s2 : 0,
13949
+ depth: this.hierarchy.depths[a2],
13950
+ path: Af(this.hierarchy, a2),
13951
+ color: this.nodeColors[a2] ?? "rgba(128,128,128,1)"
13972
13952
  };
13973
- this.setHover(l2), zf(t2, l2, this.dynCfg);
13953
+ this.setHover(c2), zf(t2, c2, this.dynCfg);
13974
13954
  }
13975
13955
  handlePointerLeave() {
13976
13956
  this.setHover(null), this.handle !== null && zf(this.handle, null, this.dynCfg);
@@ -13983,10 +13963,8 @@ ${G2 ?? ""}`;
13983
13963
  handleClick(e2) {
13984
13964
  let t2 = this.handle;
13985
13965
  if (t2 === null || this.resolvedViewMode !== "drill-down") return;
13986
- let n2 = e2.currentTarget;
13987
- if (n2 === null) return;
13988
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = Bf(this.hierarchy, t2.layout, i2, a2, this.resolvedViewMode);
13989
- o2 < 0 || o2 === this.rootIdx || this.hierarchy.childCount[o2] !== 0 && this.drillTo(o2);
13966
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = Bf(this.hierarchy, t2.layout, r2, i2, this.resolvedViewMode);
13967
+ a2 < 0 || a2 === this.rootIdx || this.hierarchy.childCount[a2] !== 0 && this.drillTo(a2);
13990
13968
  }
13991
13969
  setPath(e2) {
13992
13970
  if (this.props.onPathChange !== void 0) {
@@ -14709,25 +14687,23 @@ ${G2 ?? ""}`;
14709
14687
  handlePointerMove(e2) {
14710
14688
  let t2 = this.handle;
14711
14689
  if (t2 === null || this.hierarchy.length === 0) return;
14712
- let n2 = e2.currentTarget;
14713
- if (n2 === null) return;
14714
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = yp(this.hierarchy, t2.layout, i2, a2);
14715
- if (o2 < 0) {
14690
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = yp(this.hierarchy, t2.layout, r2, i2);
14691
+ if (a2 < 0) {
14716
14692
  this.setHover(null), vp(t2, null, this.dynCfg);
14717
14693
  return;
14718
14694
  }
14719
- let s2 = this.hierarchy.values[o2], c2 = this.hierarchy.values[this.rootIdx], l2 = {
14720
- pointerX: i2,
14721
- pointerY: a2,
14722
- idx: o2,
14723
- name: this.hierarchy.names[o2],
14724
- value: s2,
14725
- percent: c2 > 0 ? s2 / c2 : 0,
14726
- depth: this.hierarchy.depths[o2],
14727
- path: cp(this.hierarchy, o2),
14728
- color: this.nodeColors[o2] ?? "rgba(128,128,128,1)"
14695
+ let o2 = this.hierarchy.values[a2], s2 = this.hierarchy.values[this.rootIdx], c2 = {
14696
+ pointerX: r2,
14697
+ pointerY: i2,
14698
+ idx: a2,
14699
+ name: this.hierarchy.names[a2],
14700
+ value: o2,
14701
+ percent: s2 > 0 ? o2 / s2 : 0,
14702
+ depth: this.hierarchy.depths[a2],
14703
+ path: cp(this.hierarchy, a2),
14704
+ color: this.nodeColors[a2] ?? "rgba(128,128,128,1)"
14729
14705
  };
14730
- this.setHover(l2), vp(t2, l2, this.dynCfg);
14706
+ this.setHover(c2), vp(t2, c2, this.dynCfg);
14731
14707
  }
14732
14708
  handlePointerLeave() {
14733
14709
  this.setHover(null), this.handle !== null && vp(this.handle, null, this.dynCfg);
@@ -14740,10 +14716,8 @@ ${G2 ?? ""}`;
14740
14716
  handleClick(e2) {
14741
14717
  let t2 = this.handle;
14742
14718
  if (t2 === null || this.resolvedViewMode !== "drill-down") return;
14743
- let n2 = e2.currentTarget;
14744
- if (n2 === null) return;
14745
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = yp(this.hierarchy, t2.layout, i2, a2);
14746
- o2 < 0 || o2 === this.rootIdx || this.hierarchy.childCount[o2] !== 0 && this.drillTo(o2);
14719
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = yp(this.hierarchy, t2.layout, r2, i2);
14720
+ a2 < 0 || a2 === this.rootIdx || this.hierarchy.childCount[a2] !== 0 && this.drillTo(a2);
14747
14721
  }
14748
14722
  setPath(e2) {
14749
14723
  if (this.props.onPathChange !== void 0) {
@@ -15240,27 +15214,25 @@ ${G2 ?? ""}`;
15240
15214
  handlePointerMove(e2) {
15241
15215
  let t2 = this.handle;
15242
15216
  if (t2 === null || this.bricks.length === 0) return;
15243
- let n2 = e2.currentTarget;
15244
- if (n2 === null) return;
15245
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout;
15246
- if (i2 < o2.innerLeft || i2 > o2.innerRight || a2 < o2.innerTop || a2 > o2.innerBottom) {
15217
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = t2.layout;
15218
+ if (r2 < a2.innerLeft || r2 > a2.innerRight || i2 < a2.innerTop || i2 > a2.innerBottom) {
15247
15219
  this.setHover(null), zp(t2, null, this.dynCfg);
15248
15220
  return;
15249
15221
  }
15250
- let s2 = o2.xScale.fromPx(i2), c2 = Math.floor(s2);
15251
- c2 < 0 && (c2 = 0), c2 >= this.bricks.length && (c2 = this.bricks.length - 1);
15252
- let l2 = X(this.bricks.bottomPrices, c2), u2 = X(this.bricks.topPrices, c2), d2 = this.bricks.directions[c2], f2 = this.bricks.sourceIdx[c2], p2 = f2 >= 0 && f2 < this.candleTimes.length ? this.candleTimes[f2] : 0, m2 = {
15253
- pointerX: i2,
15254
- pointerY: a2,
15255
- snapX: o2.xScale.toPx(c2 + 0.5),
15256
- snapY: o2.yScale.toPx((l2 + u2) / 2),
15257
- idx: c2,
15258
- direction: d2,
15259
- bottomPrice: l2,
15260
- topPrice: u2,
15261
- sourceTime: p2
15222
+ let o2 = a2.xScale.fromPx(r2), s2 = Math.floor(o2);
15223
+ s2 < 0 && (s2 = 0), s2 >= this.bricks.length && (s2 = this.bricks.length - 1);
15224
+ let c2 = X(this.bricks.bottomPrices, s2), l2 = X(this.bricks.topPrices, s2), u2 = this.bricks.directions[s2], d2 = this.bricks.sourceIdx[s2], f2 = d2 >= 0 && d2 < this.candleTimes.length ? this.candleTimes[d2] : 0, p2 = {
15225
+ pointerX: r2,
15226
+ pointerY: i2,
15227
+ snapX: a2.xScale.toPx(s2 + 0.5),
15228
+ snapY: a2.yScale.toPx((c2 + l2) / 2),
15229
+ idx: s2,
15230
+ direction: u2,
15231
+ bottomPrice: c2,
15232
+ topPrice: l2,
15233
+ sourceTime: f2
15262
15234
  };
15263
- this.setHover(m2), zp(t2, m2, this.dynCfg);
15235
+ this.setHover(p2), zp(t2, p2, this.dynCfg);
15264
15236
  }
15265
15237
  handlePointerLeave() {
15266
15238
  this.setHover(null), this.handle !== null && zp(this.handle, null, this.dynCfg);
@@ -15653,25 +15625,23 @@ ${G2 ?? ""}`;
15653
15625
  handlePointerMove(e2) {
15654
15626
  let t2 = this.handle;
15655
15627
  if (t2 === null || this.legs.length === 0) return;
15656
- let n2 = e2.currentTarget;
15657
- if (n2 === null) return;
15658
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout;
15659
- if (i2 < o2.innerLeft || i2 > o2.innerRight) {
15628
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = t2.layout;
15629
+ if (r2 < a2.innerLeft || r2 > a2.innerRight) {
15660
15630
  this.setHover(null), Gp(t2, null, this.dynCfg);
15661
15631
  return;
15662
15632
  }
15663
- let s2 = o2.xScale.fromPx(i2), c2 = Math.floor(s2);
15664
- c2 < 0 && (c2 = 0), c2 >= this.legs.length && (c2 = this.legs.length - 1);
15665
- let l2 = {
15666
- pointerX: i2,
15667
- pointerY: a2,
15668
- idx: c2,
15669
- direction: this.legs.directions[c2],
15670
- thick: this.legs.thick[c2] === 1,
15671
- startPrice: this.legs.startPrices[c2],
15672
- endPrice: this.legs.endPrices[c2]
15633
+ let o2 = a2.xScale.fromPx(r2), s2 = Math.floor(o2);
15634
+ s2 < 0 && (s2 = 0), s2 >= this.legs.length && (s2 = this.legs.length - 1);
15635
+ let c2 = {
15636
+ pointerX: r2,
15637
+ pointerY: i2,
15638
+ idx: s2,
15639
+ direction: this.legs.directions[s2],
15640
+ thick: this.legs.thick[s2] === 1,
15641
+ startPrice: this.legs.startPrices[s2],
15642
+ endPrice: this.legs.endPrices[s2]
15673
15643
  };
15674
- this.setHover(l2), Gp(t2, l2, this.dynCfg);
15644
+ this.setHover(c2), Gp(t2, c2, this.dynCfg);
15675
15645
  }
15676
15646
  handlePointerLeave() {
15677
15647
  this.setHover(null), this.handle !== null && Gp(this.handle, null, this.dynCfg);
@@ -16034,24 +16004,22 @@ ${G2 ?? ""}`;
16034
16004
  handlePointerMove(e2) {
16035
16005
  let t2 = this.handle;
16036
16006
  if (t2 === null || this.columns.length === 0) return;
16037
- let n2 = e2.currentTarget;
16038
- if (n2 === null) return;
16039
- let r2 = n2.getBoundingClientRect(), i2 = e2.clientX - r2.left, a2 = e2.clientY - r2.top, o2 = t2.layout;
16040
- if (i2 < o2.innerLeft || i2 > o2.innerRight) {
16007
+ let n2 = this.staticCanvas.getBoundingClientRect(), r2 = e2.clientX - n2.left, i2 = e2.clientY - n2.top, a2 = t2.layout;
16008
+ if (r2 < a2.innerLeft || r2 > a2.innerRight) {
16041
16009
  this.setHover(null), Qp(t2, null, this.dynCfg);
16042
16010
  return;
16043
16011
  }
16044
- let s2 = o2.xScale.fromPx(i2), c2 = Math.floor(s2);
16045
- c2 < 0 && (c2 = 0), c2 >= this.columns.length && (c2 = this.columns.length - 1);
16046
- let l2 = {
16047
- pointerX: i2,
16048
- pointerY: a2,
16049
- idx: c2,
16050
- direction: this.columns.directions[c2],
16051
- bottomBox: this.columns.bottomBoxes[c2],
16052
- topBox: this.columns.topBoxes[c2]
16012
+ let o2 = a2.xScale.fromPx(r2), s2 = Math.floor(o2);
16013
+ s2 < 0 && (s2 = 0), s2 >= this.columns.length && (s2 = this.columns.length - 1);
16014
+ let c2 = {
16015
+ pointerX: r2,
16016
+ pointerY: i2,
16017
+ idx: s2,
16018
+ direction: this.columns.directions[s2],
16019
+ bottomBox: this.columns.bottomBoxes[s2],
16020
+ topBox: this.columns.topBoxes[s2]
16053
16021
  };
16054
- this.setHover(l2), Qp(t2, l2, this.dynCfg);
16022
+ this.setHover(c2), Qp(t2, c2, this.dynCfg);
16055
16023
  }
16056
16024
  handlePointerLeave() {
16057
16025
  this.setHover(null), this.handle !== null && Qp(this.handle, null, this.dynCfg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abdullahjaswal/tickyr-charts-solid",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Tickyr Charts for SolidJS: opinionated, canvas-rendered trading and financial-data charts, powered by a vendored Rust/WASM engine.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",