@visactor/vrender-core 1.1.6-alpha.0 → 1.1.6

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 (82) hide show
  1. package/cjs/common/canvas-utils.d.ts +4 -1
  2. package/cjs/common/canvas-utils.js +9 -4
  3. package/cjs/common/canvas-utils.js.map +1 -1
  4. package/cjs/common/polygon.d.ts +8 -0
  5. package/cjs/common/polygon.js +107 -3
  6. package/cjs/common/polygon.js.map +1 -1
  7. package/cjs/graphic/graphic-service/polygon-outer-border-bounds.d.ts +4 -0
  8. package/cjs/graphic/graphic-service/polygon-outer-border-bounds.js +36 -0
  9. package/cjs/graphic/graphic-service/polygon-outer-border-bounds.js.map +1 -0
  10. package/cjs/graphic/graphic.d.ts +9 -9
  11. package/cjs/graphic/graphic.js +45 -54
  12. package/cjs/graphic/graphic.js.map +1 -1
  13. package/cjs/graphic/group.d.ts +4 -6
  14. package/cjs/graphic/group.js +11 -21
  15. package/cjs/graphic/group.js.map +1 -1
  16. package/cjs/graphic/node-tree.d.ts +1 -2
  17. package/cjs/graphic/node-tree.js +1 -1
  18. package/cjs/graphic/node-tree.js.map +1 -1
  19. package/cjs/graphic/polygon.d.ts +2 -0
  20. package/cjs/graphic/polygon.js +12 -2
  21. package/cjs/graphic/polygon.js.map +1 -1
  22. package/cjs/graphic/richtext.d.ts +1 -2
  23. package/cjs/graphic/richtext.js +2 -2
  24. package/cjs/graphic/richtext.js.map +1 -1
  25. package/cjs/graphic/state/state-transition-orchestrator.d.ts +4 -0
  26. package/cjs/graphic/state/state-transition-orchestrator.js +11 -5
  27. package/cjs/graphic/state/state-transition-orchestrator.js.map +1 -1
  28. package/cjs/graphic/text.js +7 -3
  29. package/cjs/graphic/text.js.map +1 -1
  30. package/cjs/interface/graphic.d.ts +1 -1
  31. package/cjs/interface/graphic.js.map +1 -1
  32. package/cjs/interface/node-tree.d.ts +1 -2
  33. package/cjs/interface/node-tree.js.map +1 -1
  34. package/cjs/render/contributions/render/contributions/polygon-contribution-render.d.ts +9 -0
  35. package/cjs/render/contributions/render/contributions/polygon-contribution-render.js +40 -2
  36. package/cjs/render/contributions/render/contributions/polygon-contribution-render.js.map +1 -1
  37. package/cjs/render/contributions/render/contributions/rect-contribution-render.js +5 -5
  38. package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  39. package/cjs/render/contributions/render/polygon-render.js +1 -1
  40. package/cjs/render/contributions/render/polygon-render.js.map +1 -1
  41. package/dist/index.es.js +433 -198
  42. package/es/common/canvas-utils.d.ts +4 -1
  43. package/es/common/canvas-utils.js +6 -2
  44. package/es/common/canvas-utils.js.map +1 -1
  45. package/es/common/polygon.d.ts +8 -0
  46. package/es/common/polygon.js +102 -0
  47. package/es/common/polygon.js.map +1 -1
  48. package/es/graphic/graphic-service/polygon-outer-border-bounds.d.ts +4 -0
  49. package/es/graphic/graphic-service/polygon-outer-border-bounds.js +32 -0
  50. package/es/graphic/graphic-service/polygon-outer-border-bounds.js.map +1 -0
  51. package/es/graphic/graphic.d.ts +9 -9
  52. package/es/graphic/graphic.js +45 -54
  53. package/es/graphic/graphic.js.map +1 -1
  54. package/es/graphic/group.d.ts +4 -6
  55. package/es/graphic/group.js +11 -21
  56. package/es/graphic/group.js.map +1 -1
  57. package/es/graphic/node-tree.d.ts +1 -2
  58. package/es/graphic/node-tree.js +1 -1
  59. package/es/graphic/node-tree.js.map +1 -1
  60. package/es/graphic/polygon.d.ts +2 -0
  61. package/es/graphic/polygon.js +14 -2
  62. package/es/graphic/polygon.js.map +1 -1
  63. package/es/graphic/richtext.d.ts +1 -2
  64. package/es/graphic/richtext.js +2 -2
  65. package/es/graphic/richtext.js.map +1 -1
  66. package/es/graphic/state/state-transition-orchestrator.d.ts +4 -0
  67. package/es/graphic/state/state-transition-orchestrator.js +11 -5
  68. package/es/graphic/state/state-transition-orchestrator.js.map +1 -1
  69. package/es/graphic/text.js +7 -3
  70. package/es/graphic/text.js.map +1 -1
  71. package/es/interface/graphic.d.ts +1 -1
  72. package/es/interface/graphic.js.map +1 -1
  73. package/es/interface/node-tree.d.ts +1 -2
  74. package/es/interface/node-tree.js.map +1 -1
  75. package/es/render/contributions/render/contributions/polygon-contribution-render.d.ts +9 -0
  76. package/es/render/contributions/render/contributions/polygon-contribution-render.js +40 -0
  77. package/es/render/contributions/render/contributions/polygon-contribution-render.js.map +1 -1
  78. package/es/render/contributions/render/contributions/rect-contribution-render.js +5 -5
  79. package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  80. package/es/render/contributions/render/polygon-render.js +2 -2
  81. package/es/render/contributions/render/polygon-render.js.map +1 -1
  82. package/package.json +1 -1
@@ -144,8 +144,9 @@ class GraphicImpl extends node_tree_1.Node {
144
144
  }
145
145
  return null === (_a = this.stage) || void 0 === _a ? void 0 : _a.rootSharedStateScope;
146
146
  }
147
- syncSharedStateScopeBinding(nextScope, markDirty = !0) {
147
+ syncSharedStateScopeBindingFromTree(markDirty = !0) {
148
148
  var _a;
149
+ const nextScope = this.resolveBoundSharedStateScope();
149
150
  return this.boundSharedStateScope === nextScope ? (this.syncSharedStateActiveRegistrations(),
150
151
  !1) : (this.boundSharedStateScope = nextScope, this.boundSharedStateRevision = void 0,
151
152
  this.compiledStateDefinitions = void 0, this.compiledStateDefinitionsCacheKey = void 0,
@@ -153,13 +154,9 @@ class GraphicImpl extends node_tree_1.Node {
153
154
  markDirty && (null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) && this.markSharedStateDirty(),
154
155
  !0);
155
156
  }
156
- syncSharedStateScopeBindingFromTree(markDirty = !0, inheritedSharedStateScope) {
157
- const nextScope = void 0 === inheritedSharedStateScope ? this.resolveBoundSharedStateScope() : null != inheritedSharedStateScope ? inheritedSharedStateScope : void 0;
158
- return this.syncSharedStateScopeBinding(nextScope, markDirty);
159
- }
160
- syncSharedStateScopeBindingOnTreeChange(markDirty = !0, inheritedSharedStateScope) {
157
+ syncSharedStateScopeBindingOnTreeChange(markDirty = !0) {
161
158
  var _a, _b;
162
- return !!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || this.boundSharedStateScope || (null === (_b = this.registeredActiveScopes) || void 0 === _b ? void 0 : _b.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingFromTree(markDirty, inheritedSharedStateScope);
159
+ return !!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || this.boundSharedStateScope || (null === (_b = this.registeredActiveScopes) || void 0 === _b ? void 0 : _b.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingFromTree(markDirty);
163
160
  }
164
161
  syncSharedStateActiveRegistrations() {
165
162
  var _a;
@@ -167,7 +164,6 @@ class GraphicImpl extends node_tree_1.Node {
167
164
  if (!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || !this.boundSharedStateScope) return (null == previousScopes ? void 0 : previousScopes.size) && (previousScopes.forEach((scope => {
168
165
  scope.subtreeActiveDescendants.delete(this);
169
166
  })), previousScopes.clear()), void (this.registeredActiveScopes = void 0);
170
- if ((null == previousScopes ? void 0 : previousScopes.size) && this.isSharedStateScopeChainRegistered(previousScopes)) return;
171
167
  const nextScopes = new Set((0, shared_state_scope_1.collectSharedStateScopeChain)(this.boundSharedStateScope));
172
168
  null == previousScopes || previousScopes.forEach((scope => {
173
169
  nextScopes.has(scope) || scope.subtreeActiveDescendants.delete(this);
@@ -175,14 +171,6 @@ class GraphicImpl extends node_tree_1.Node {
175
171
  scope.subtreeActiveDescendants.add(this);
176
172
  })), this.registeredActiveScopes = nextScopes;
177
173
  }
178
- isSharedStateScopeChainRegistered(previousScopes) {
179
- let scope = this.boundSharedStateScope, scopeCount = 0;
180
- for (;scope; ) {
181
- if (!previousScopes.has(scope)) return !1;
182
- scopeCount += 1, scope = scope.parentScope;
183
- }
184
- return scopeCount === previousScopes.size;
185
- }
186
174
  clearSharedStateActiveRegistrations() {
187
175
  const previousScopes = this.registeredActiveScopes;
188
176
  previousScopes && (previousScopes.forEach((scope => {
@@ -193,8 +181,8 @@ class GraphicImpl extends node_tree_1.Node {
193
181
  this.sharedStateDirty = !0, (0, shared_state_refresh_1.enqueueGraphicSharedStateRefresh)(this.stage, this),
194
182
  (0, shared_state_refresh_1.scheduleStageSharedStateRefresh)(this.stage);
195
183
  }
196
- onParentSharedStateTreeChanged(stage, layer, inheritedSharedStateScope) {
197
- this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope) : this.setStage(stage, layer, inheritedSharedStateScope);
184
+ onParentSharedStateTreeChanged(stage, layer) {
185
+ this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingOnTreeChange() : this.setStage(stage, layer);
198
186
  }
199
187
  refreshSharedStateBeforeRender() {
200
188
  var _a;
@@ -247,20 +235,19 @@ class GraphicImpl extends node_tree_1.Node {
247
235
  })), snapshot) : snapshot;
248
236
  }
249
237
  buildRemovedStateAnimationAttrs(targetStateAttrs, previousResolvedStatePatch) {
250
- const extraAttrs = {};
251
- if (!previousResolvedStatePatch) return extraAttrs;
252
- const snapshot = this.buildStaticAttributeSnapshot(), staticTargetAttrs = snapshot;
238
+ if (!previousResolvedStatePatch) return;
239
+ const snapshot = this.buildStaticAttributeSnapshot(), extraAttrs = {};
253
240
  return Object.keys(previousResolvedStatePatch).forEach((key => {
254
241
  const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetStateAttrs, key);
255
242
  if (hasTargetAttr && void 0 !== targetStateAttrs[key]) return;
256
243
  const assignFallbackAttr = value => {
257
- void 0 === value && this.shouldSkipStateTransitionDefaultAttribute(key, staticTargetAttrs) || (extraAttrs[key] = void 0 === value ? value : cloneAttributeValue(value));
244
+ extraAttrs[key] = void 0 === value ? value : cloneAttributeValue(value);
258
245
  };
259
- if (hasTargetAttr) assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs)); else if (Object.prototype.hasOwnProperty.call(snapshot, key)) {
260
- const snapshotValue = snapshot[key];
261
- assignFallbackAttr(void 0 === snapshotValue ? this.getStateTransitionDefaultAttribute(key, staticTargetAttrs) : snapshotValue);
262
- } else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
263
- })), extraAttrs;
246
+ hasTargetAttr ? assignFallbackAttr(targetStateAttrs[key]) : Object.prototype.hasOwnProperty.call(snapshot, key) ? assignFallbackAttr(snapshot[key]) : assignFallbackAttr(void 0);
247
+ })), {
248
+ extraAttrs: extraAttrs,
249
+ stateTransitionTargetAttrs: snapshot
250
+ };
264
251
  }
265
252
  syncObjectToSnapshot(target, snapshot, excludedKeys) {
266
253
  const delta = new Map;
@@ -844,12 +831,6 @@ class GraphicImpl extends node_tree_1.Node {
844
831
  var _a;
845
832
  return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
846
833
  }
847
- setStateDefinitionsWithCompiled(definitions, compiledDefinitions) {
848
- var _a;
849
- this.states = definitions, this.localStateDefinitionsSource !== definitions && (this.localStateDefinitionsSource = definitions,
850
- this.localStateDefinitionsVersion = (null !== (_a = this.localStateDefinitionsVersion) && void 0 !== _a ? _a : 0) + 1),
851
- this.compiledStateDefinitions = compiledDefinitions, this.compiledStateDefinitionsCacheKey = `local:${this.localStateDefinitionsVersion}`;
852
- }
853
834
  getStateResolveBaseAttrs() {
854
835
  var _a;
855
836
  return null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute;
@@ -967,32 +948,38 @@ class GraphicImpl extends node_tree_1.Node {
967
948
  commitSameStatePatchRefresh(states, hasAnimation, animateSameStatePatchChange = !1) {
968
949
  var _a;
969
950
  const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES, previousResolvedStatePatch = this.resolvedStatePatch, {transition: transition, effectiveStates: effectiveStates, resolvedStateAttrs: resolvedStateAttrs} = this.resolveGraphicStateTransition(states, !0), patchChanged = !this.sameStatePatches(previousResolvedStatePatch, resolvedStateAttrs);
970
- patchChanged && !this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1) || (this.currentStates = transition.states,
951
+ if ((!patchChanged || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) && (this.currentStates = transition.states,
971
952
  this.effectiveStates = [ ...effectiveStates ], this.resolvedStatePatch = resolvedStateAttrs,
972
- this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), patchChanged && (hasAnimation && animateSameStatePatchChange ? (this._syncFinalAttributeFromStaticTruth(),
973
- this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(),
974
- this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
953
+ this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), patchChanged)) if (hasAnimation && animateSameStatePatchChange) {
954
+ this._syncFinalAttributeFromStaticTruth();
955
+ const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
956
+ this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
957
+ } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
975
958
  type: enums_1.AttributeUpdateType.STATE
976
959
  }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
977
960
  type: enums_1.AttributeUpdateType.STATE
978
- }), this.emitStateUpdateEvent())));
961
+ }), this.emitStateUpdateEvent();
979
962
  }
980
963
  resolveStateAnimateConfig(animateConfig) {
981
964
  var _a, _b, _c;
982
965
  return null !== (_c = null !== (_a = null != animateConfig ? animateConfig : this.stateAnimateConfig) && void 0 !== _a ? _a : null === (_b = this.context) || void 0 === _b ? void 0 : _b.stateAnimateConfig) && void 0 !== _c ? _c : config_2.DefaultStateAnimateConfig;
983
966
  }
984
- applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs) {
967
+ applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs, stateTransitionTargetAttrs) {
985
968
  const resolvedAnimateConfig = hasAnimation ? this.resolveStateAnimateConfig(animateConfig) : void 0, transitionOptions = resolvedAnimateConfig ? {
986
969
  animateConfig: resolvedAnimateConfig,
987
970
  extraAnimateAttrs: extraAnimateAttrs,
988
- shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
971
+ getStateTransitionDefaultAttribute: this.getStateTransitionDefaultAttribute.bind(this),
972
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this),
973
+ stateTransitionTargetAttrs: stateTransitionTargetAttrs
989
974
  } : void 0;
990
975
  if (isClear) return void this.getStateTransitionOrchestrator().applyClearTransition(this, attrs, hasAnimation, transitionOptions);
991
976
  const plan = this.getStateTransitionOrchestrator().analyzeTransition(attrs, hasAnimation, {
992
977
  noWorkAnimateAttr: this.getNoWorkAnimateAttr(),
993
978
  animateConfig: resolvedAnimateConfig,
994
979
  extraAnimateAttrs: extraAnimateAttrs,
995
- shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this)
980
+ getStateTransitionDefaultAttribute: this.getStateTransitionDefaultAttribute.bind(this),
981
+ shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this),
982
+ stateTransitionTargetAttrs: stateTransitionTargetAttrs
996
983
  });
997
984
  this.getStateTransitionOrchestrator().applyTransition(this, plan, hasAnimation, transitionOptions);
998
985
  }
@@ -1019,15 +1006,17 @@ class GraphicImpl extends node_tree_1.Node {
1019
1006
  this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1,
1020
1007
  void this.clearSharedStateActiveRegistrations();
1021
1008
  const resolvedStateAttrs = hasAnimation || this.hasCustomEvent("beforeStateUpdate") ? cloneAttributeValue(null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : {}) : null !== (_c = this.baseAttributes) && void 0 !== _c ? _c : {};
1022
- transition.changed && !this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0) || (this.currentStates = transition.states,
1009
+ if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) if (this.currentStates = transition.states,
1023
1010
  this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1,
1024
- this.clearSharedStateActiveRegistrations(), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(),
1025
- this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(),
1026
- this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
1011
+ this.clearSharedStateActiveRegistrations(), hasAnimation) {
1012
+ this._syncFinalAttributeFromStaticTruth();
1013
+ const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
1014
+ this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
1015
+ } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
1027
1016
  type: enums_1.AttributeUpdateType.STATE
1028
1017
  }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, void 0, {
1029
1018
  type: enums_1.AttributeUpdateType.STATE
1030
- }), this.emitStateUpdateEvent()));
1019
+ }), this.emitStateUpdateEvent();
1031
1020
  }
1032
1021
  removeState(stateName, hasAnimation) {
1033
1022
  const transition = this.resolveRemoveStateTransition(stateName);
@@ -1056,15 +1045,17 @@ class GraphicImpl extends node_tree_1.Node {
1056
1045
  var _a;
1057
1046
  if (!states.length) return void this.clearStates(hasAnimation);
1058
1047
  const previousStates = null !== (_a = this.currentStates) && void 0 !== _a ? _a : EMPTY_STATE_NAMES, previousResolvedStatePatch = this.resolvedStatePatch, {transition: transition, effectiveStates: effectiveStates, resolvedStateAttrs: resolvedStateAttrs} = this.resolveGraphicStateTransition(states);
1059
- !transition.changed && this.sameStateNames(previousStates, transition.states) || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1) && (this.currentStates = transition.states,
1048
+ if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) if (this.currentStates = transition.states,
1060
1049
  this.effectiveStates = [ ...effectiveStates ], this.resolvedStatePatch = resolvedStateAttrs,
1061
- this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), hasAnimation ? (this._syncFinalAttributeFromStaticTruth(),
1062
- this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch))) : (this.stopStateAnimates(),
1063
- this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
1050
+ this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), hasAnimation) {
1051
+ this._syncFinalAttributeFromStaticTruth();
1052
+ const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
1053
+ this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
1054
+ } else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
1064
1055
  type: enums_1.AttributeUpdateType.STATE
1065
1056
  }) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
1066
1057
  type: enums_1.AttributeUpdateType.STATE
1067
- }), this.emitStateUpdateEvent()));
1058
+ }), this.emitStateUpdateEvent();
1068
1059
  }
1069
1060
  invalidateResolver() {
1070
1061
  var _a, _b;
@@ -1175,11 +1166,11 @@ class GraphicImpl extends node_tree_1.Node {
1175
1166
  this._globalTransMatrix.translate(scrollX, scrollY);
1176
1167
  }
1177
1168
  }
1178
- setStage(stage, layer, inheritedSharedStateScope) {
1169
+ setStage(stage, layer) {
1179
1170
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1180
1171
  const graphicService = null !== (_c = null !== (_a = null == stage ? void 0 : stage.graphicService) && void 0 !== _a ? _a : null === (_b = this.stage) || void 0 === _b ? void 0 : _b.graphicService) && void 0 !== _c ? _c : application_1.application.graphicService, previousStage = this.stage;
1181
1172
  if (this.stage !== stage || this.layer !== layer) {
1182
- if (this.stage = stage, this.layer = layer, ((null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope),
1173
+ if (this.stage = stage, this.layer = layer, ((null === (_d = this.currentStates) || void 0 === _d ? void 0 : _d.length) || this.boundSharedStateScope || (null === (_e = this.registeredActiveScopes) || void 0 === _e ? void 0 : _e.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0),
1183
1174
  this.setStageToShadowRoot(stage, layer), this.mayHaveTrackedAnimates() && this.hasAnyTrackedAnimate()) {
1184
1175
  const previousTimeline = null === (_f = null == previousStage ? void 0 : previousStage.getTimeline) || void 0 === _f ? void 0 : _f.call(previousStage), nextTimeline = null === (_g = null == stage ? void 0 : stage.getTimeline) || void 0 === _g ? void 0 : _g.call(stage), detachedStageAnimates = [];
1185
1176
  this.visitTrackedAnimates((a => {
@@ -1197,7 +1188,7 @@ class GraphicImpl extends node_tree_1.Node {
1197
1188
  }
1198
1189
  return this._onSetStage && this._onSetStage(this, stage, layer), void (null === (_h = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _h || _h.call(graphicService, this, stage));
1199
1190
  }
1200
- ((null === (_j = this.currentStates) || void 0 === _j ? void 0 : _j.length) || this.boundSharedStateScope || (null === (_k = this.registeredActiveScopes) || void 0 === _k ? void 0 : _k.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope);
1191
+ ((null === (_j = this.currentStates) || void 0 === _j ? void 0 : _j.length) || this.boundSharedStateScope || (null === (_k = this.registeredActiveScopes) || void 0 === _k ? void 0 : _k.size) || this.sharedStateDirty) && this.syncSharedStateScopeBindingOnTreeChange(!0);
1201
1192
  }
1202
1193
  detachStageForRelease() {
1203
1194
  var _a, _b, _c;