@visactor/vchart 2.0.13-alpha.2 → 2.0.13-alpha.3

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.
package/build/index.es.js CHANGED
@@ -95673,11 +95673,15 @@ function showTooltip(datum, options, component) {
95673
95673
  });
95674
95674
  return originDatum;
95675
95675
  };
95676
+ const transform = region.getOption().globalInstance.getStage().window.getViewBoxTransform().getInverse();
95676
95677
  const getMockEvent = (originPos) => {
95677
95678
  var _a, _b;
95678
95679
  const pos = bound(originPos);
95679
- const canvasX = (_a = opt.x) !== null && _a !== void 0 ? _a : regionPos.x + pos.x;
95680
- const canvasY = (_b = opt.y) !== null && _b !== void 0 ? _b : regionPos.y + pos.y;
95680
+ const tempX = (_a = opt.x) !== null && _a !== void 0 ? _a : regionPos.x + pos.x;
95681
+ const tempY = (_b = opt.y) !== null && _b !== void 0 ? _b : regionPos.y + pos.y;
95682
+ const canvasPoint = { x: 0, y: 0 };
95683
+ transform.transformPoint({ x: tempX, y: tempY }, canvasPoint);
95684
+ const { x: canvasX, y: canvasY } = canvasPoint;
95681
95685
  return {
95682
95686
  canvasX,
95683
95687
  canvasY,
package/build/index.js CHANGED
@@ -95679,11 +95679,15 @@
95679
95679
  });
95680
95680
  return originDatum;
95681
95681
  };
95682
+ const transform = region.getOption().globalInstance.getStage().window.getViewBoxTransform().getInverse();
95682
95683
  const getMockEvent = (originPos) => {
95683
95684
  var _a, _b;
95684
95685
  const pos = bound(originPos);
95685
- const canvasX = (_a = opt.x) !== null && _a !== void 0 ? _a : regionPos.x + pos.x;
95686
- const canvasY = (_b = opt.y) !== null && _b !== void 0 ? _b : regionPos.y + pos.y;
95686
+ const tempX = (_a = opt.x) !== null && _a !== void 0 ? _a : regionPos.x + pos.x;
95687
+ const tempY = (_b = opt.y) !== null && _b !== void 0 ? _b : regionPos.y + pos.y;
95688
+ const canvasPoint = { x: 0, y: 0 };
95689
+ transform.transformPoint({ x: tempX, y: tempY }, canvasPoint);
95690
+ const { x: canvasX, y: canvasY } = canvasPoint;
95687
95691
  return {
95688
95692
  canvasX,
95689
95693
  canvasY,