@visactor/vrender-kits 1.1.6 → 1.1.8-alpha.0

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.
@@ -16,4 +16,4 @@ function createModule(CanvasConstructor, ContextConstructor) {
16
16
  }
17
17
 
18
18
  exports.createModule = createModule;
19
- //# sourceMappingURL=create-canvas-module.js.map
19
+ //# sourceMappingURL=create-canvas-module.js.map
@@ -45,4 +45,4 @@ exports.loadAllCavnvas = loadAllCavnvas, exports.loadBrowserCanvas = loadBrowser
45
45
  exports.loadFeishuCanvas = loadFeishuCanvas, exports.loadLynxCanvas = loadLynxCanvas,
46
46
  exports.loadNodeCanvas = loadNodeCanvas, exports.loadTaroCanvas = loadTaroCanvas,
47
47
  exports.loadTTCanvas = loadTTCanvas, exports.loadWxCanvas = loadWxCanvas;
48
- //# sourceMappingURL=modules.js.map
48
+ //# sourceMappingURL=modules.js.map
@@ -79,4 +79,4 @@ class CanvasWrapEnableWH {
79
79
  }
80
80
 
81
81
  exports.CanvasWrapEnableWH = CanvasWrapEnableWH;
82
- //# sourceMappingURL=canvas-wrap.js.map
82
+ //# sourceMappingURL=canvas-wrap.js.map
@@ -101,4 +101,4 @@ class FeishuEnvContribution extends vrender_core_1.BaseEnvContribution {
101
101
  }
102
102
 
103
103
  exports.FeishuEnvContribution = FeishuEnvContribution;
104
- //# sourceMappingURL=feishu-contribution.js.map
104
+ //# sourceMappingURL=feishu-contribution.js.map
package/dist/index.es.js CHANGED
@@ -15747,7 +15747,8 @@ class DefaultIncrementalDrawContribution extends DefaultDrawContribution {
15747
15747
  }
15748
15748
 
15749
15749
  const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
15750
- const tempDirtyBounds = new AABBBounds(),
15750
+ const INTERACTIVE_POST_MATRIX = "_interactivePostMatrix",
15751
+ tempDirtyBounds = new AABBBounds(),
15751
15752
  tempBackupDirtyBounds = new AABBBounds();
15752
15753
  class ShadowRootDrawItemInterceptorContribution {
15753
15754
  constructor() {
@@ -15811,12 +15812,23 @@ class InteractiveDrawItemInterceptorContribution {
15811
15812
  beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
15812
15813
  return !this.processing && (graphic.baseGraphic ? this.beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) : this.beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params));
15813
15814
  }
15815
+ resolveInteractivePostMatrix(graphic, interactiveGraphic) {
15816
+ const parent = graphic.parent;
15817
+ if (!parent) return graphic.attribute.postMatrix;
15818
+ let matrix = interactiveGraphic[INTERACTIVE_POST_MATRIX];
15819
+ matrix || (matrix = new Matrix(), interactiveGraphic[INTERACTIVE_POST_MATRIX] = matrix);
15820
+ const ancestorMatrix = parent.globalTransMatrix;
15821
+ matrix.setValue(ancestorMatrix.a, ancestorMatrix.b, ancestorMatrix.c, ancestorMatrix.d, ancestorMatrix.e, ancestorMatrix.f);
15822
+ const ownPostMatrix = graphic.attribute.postMatrix;
15823
+ return ownPostMatrix && matrix.multiply(ownPostMatrix.a, ownPostMatrix.b, ownPostMatrix.c, ownPostMatrix.d, ownPostMatrix.e, ownPostMatrix.f), matrix;
15824
+ }
15814
15825
  beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params) {
15815
15826
  let interactiveGraphic = graphic.interactiveGraphic;
15816
15827
  if (graphic.attribute.globalZIndex) {
15817
15828
  interactiveGraphic || (interactiveGraphic = graphic.clone(), graphic.interactiveGraphic = interactiveGraphic, interactiveGraphic.baseGraphic = graphic), interactiveGraphic.setAttributes({
15818
15829
  globalZIndex: 0,
15819
- zIndex: graphic.attribute.globalZIndex
15830
+ zIndex: graphic.attribute.globalZIndex,
15831
+ postMatrix: this.resolveInteractivePostMatrix(graphic, interactiveGraphic)
15820
15832
  }, !1, {
15821
15833
  skipUpdateCallback: !0
15822
15834
  }), drawContext.stage.tryInitInteractiveLayer();
@@ -8,4 +8,4 @@ export function createModule(CanvasConstructor, ContextConstructor) {
8
8
  hasContextFactory || bindingContainer.bind(Context2dFactory).toDynamicValue((() => (params, dpr) => new ContextConstructor(params, dpr))).whenTargetNamed(ContextConstructor.env);
9
9
  };
10
10
  }
11
- //# sourceMappingURL=create-canvas-module.js.map
11
+ //# sourceMappingURL=create-canvas-module.js.map
@@ -45,4 +45,4 @@ export function loadTTCanvas(container) {
45
45
  export function loadWxCanvas(container) {
46
46
  bindWxCanvasModules(container);
47
47
  }
48
- //# sourceMappingURL=modules.js.map
48
+ //# sourceMappingURL=modules.js.map
@@ -69,4 +69,4 @@ export class CanvasWrapEnableWH {
69
69
  };
70
70
  }
71
71
  }
72
- //# sourceMappingURL=canvas-wrap.js.map
72
+ //# sourceMappingURL=canvas-wrap.js.map
@@ -96,4 +96,4 @@ export class FeishuEnvContribution extends BaseEnvContribution {
96
96
  event;
97
97
  }
98
98
  }
99
- //# sourceMappingURL=feishu-contribution.js.map
99
+ //# sourceMappingURL=feishu-contribution.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vrender-kits",
3
- "version": "1.1.6",
3
+ "version": "1.1.8-alpha.0",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "main": "cjs/index-node.js",
@@ -44,7 +44,7 @@
44
44
  ],
45
45
  "dependencies": {
46
46
  "@visactor/vutils": "~1.0.12",
47
- "@visactor/vrender-core": "1.1.6",
47
+ "@visactor/vrender-core": "1.1.8-alpha.0",
48
48
  "@resvg/resvg-js": "2.4.1",
49
49
  "roughjs": "4.6.6",
50
50
  "gifuct-js": "2.1.2",