@visactor/vrender-kits 1.1.4-alpha.1 → 1.1.4-alpha.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.
- package/dist/index.es.js +74 -27
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -4496,13 +4496,14 @@ function applyFillStyle(ctx, character, b) {
|
|
|
4496
4496
|
}) : fillStyle, setTextStyle(ctx, character);
|
|
4497
4497
|
}
|
|
4498
4498
|
function applyStrokeStyle(ctx, character) {
|
|
4499
|
+
var _a, _b;
|
|
4499
4500
|
const strokeStyle = character && character.stroke || defaultFormatting.stroke;
|
|
4500
4501
|
if (!strokeStyle) return void (ctx.globalAlpha = 0);
|
|
4501
4502
|
const {
|
|
4502
4503
|
strokeOpacity = 1,
|
|
4503
4504
|
opacity = 1
|
|
4504
4505
|
} = character;
|
|
4505
|
-
ctx.globalAlpha = strokeOpacity * opacity, ctx.lineWidth = character && "number" == typeof character.lineWidth ? character.lineWidth : 1, ctx.strokeStyle = strokeStyle, setTextStyle(ctx, character);
|
|
4506
|
+
ctx.globalAlpha = strokeOpacity * opacity, ctx.lineWidth = character && "number" == typeof character.lineWidth ? character.lineWidth : 1, ctx.setLineDash(null !== (_a = character.lineDash) && void 0 !== _a ? _a : []), ctx.lineDashOffset = null !== (_b = character.lineDashOffset) && void 0 !== _b ? _b : 0, ctx.strokeStyle = strokeStyle, setTextStyle(ctx, character);
|
|
4506
4507
|
}
|
|
4507
4508
|
function getStrByWithCanvas(desc, width, character, guessIndex, needTestLetter) {
|
|
4508
4509
|
if (desc.length <= 1) return 0;
|
|
@@ -6286,7 +6287,7 @@ class Node extends EventEmitter {
|
|
|
6286
6287
|
constructor() {
|
|
6287
6288
|
super(), this._uid = Generator.GenAutoIncrementId(), this._firstChild = null, this._lastChild = null, this.parent = null, this._count = 1;
|
|
6288
6289
|
}
|
|
6289
|
-
onParentSharedStateTreeChanged(_stage, _layer) {}
|
|
6290
|
+
onParentSharedStateTreeChanged(_stage, _layer, _inheritedSharedStateScope) {}
|
|
6290
6291
|
forEachChildren(cb, reverse = !1) {
|
|
6291
6292
|
if (reverse) {
|
|
6292
6293
|
let child = this._lastChild,
|
|
@@ -8208,6 +8209,8 @@ class StateEngine {
|
|
|
8208
8209
|
this.graphic === graphic && this.baseAttributes === baseAttributes || this.invalidateResolverCache(), this.graphic = graphic, this.baseAttributes = baseAttributes;
|
|
8209
8210
|
}
|
|
8210
8211
|
applyStates(stateNames) {
|
|
8212
|
+
const singleStaticStateResult = this.tryApplySingleStaticState(stateNames);
|
|
8213
|
+
if (singleStaticStateResult) return singleStaticStateResult;
|
|
8211
8214
|
const uniqueStates = Array.from(new Set(stateNames)),
|
|
8212
8215
|
sortedStates = this.sortStates(uniqueStates),
|
|
8213
8216
|
adjudicated = this.adjudicate(sortedStates),
|
|
@@ -8222,6 +8225,19 @@ class StateEngine {
|
|
|
8222
8225
|
suppressed: [...this._suppressed]
|
|
8223
8226
|
};
|
|
8224
8227
|
}
|
|
8228
|
+
tryApplySingleStaticState(stateNames) {
|
|
8229
|
+
if (1 !== stateNames.length || "shallow" !== this.mergeMode) return;
|
|
8230
|
+
const stateName = stateNames[0],
|
|
8231
|
+
definition = this.compiledDefinitions.get(stateName);
|
|
8232
|
+
if (definition && (definition.hasResolver || definition.exclude.size || definition.suppress.size)) return;
|
|
8233
|
+
const changed = 1 !== this._activeStates.length || this._activeStates[0] !== stateName || 1 !== this._effectiveStates.length || this._effectiveStates[0] !== stateName || 0 !== this._suppressed.length;
|
|
8234
|
+
return this._activeStates = [stateName], this._effectiveStates = [stateName], this._suppressed = [], !changed && this.resolverCacheValid || (this.resolverPatchCache.clear(), this.resolverCacheKey = stateName, this.resolverCacheValid = !0, this._resolvedPatch = (null == definition ? void 0 : definition.patch) ? cloneValue(definition.patch) : {}), {
|
|
8235
|
+
changed: changed,
|
|
8236
|
+
activeStates: [...this._activeStates],
|
|
8237
|
+
effectiveStates: [...this._effectiveStates],
|
|
8238
|
+
suppressed: []
|
|
8239
|
+
};
|
|
8240
|
+
}
|
|
8225
8241
|
addState(stateName, keepCurrentStates) {
|
|
8226
8242
|
if (this._activeStates.includes(stateName) && (keepCurrentStates || 1 === this._activeStates.length)) return {
|
|
8227
8243
|
changed: !1,
|
|
@@ -8634,14 +8650,17 @@ class GraphicImpl extends Node {
|
|
|
8634
8650
|
}
|
|
8635
8651
|
return null === (_a = this.stage) || void 0 === _a ? void 0 : _a.rootSharedStateScope;
|
|
8636
8652
|
}
|
|
8637
|
-
|
|
8653
|
+
syncSharedStateScopeBinding(nextScope, markDirty = !0) {
|
|
8638
8654
|
var _a;
|
|
8639
|
-
const nextScope = this.resolveBoundSharedStateScope();
|
|
8640
8655
|
return this.boundSharedStateScope === nextScope ? (this.syncSharedStateActiveRegistrations(), !1) : (this.boundSharedStateScope = nextScope, this.boundSharedStateRevision = void 0, this.compiledStateDefinitions = void 0, this.compiledStateDefinitionsCacheKey = void 0, this.stateEngine = void 0, this.stateEngineCompiledDefinitions = void 0, this.syncSharedStateActiveRegistrations(), markDirty && (null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) && this.markSharedStateDirty(), !0);
|
|
8641
8656
|
}
|
|
8642
|
-
|
|
8657
|
+
syncSharedStateScopeBindingFromTree(markDirty = !0, inheritedSharedStateScope) {
|
|
8658
|
+
const nextScope = void 0 === inheritedSharedStateScope ? this.resolveBoundSharedStateScope() : null != inheritedSharedStateScope ? inheritedSharedStateScope : void 0;
|
|
8659
|
+
return this.syncSharedStateScopeBinding(nextScope, markDirty);
|
|
8660
|
+
}
|
|
8661
|
+
syncSharedStateScopeBindingOnTreeChange(markDirty = !0, inheritedSharedStateScope) {
|
|
8643
8662
|
var _a, _b;
|
|
8644
|
-
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);
|
|
8663
|
+
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);
|
|
8645
8664
|
}
|
|
8646
8665
|
syncSharedStateActiveRegistrations() {
|
|
8647
8666
|
var _a;
|
|
@@ -8649,6 +8668,7 @@ class GraphicImpl extends Node {
|
|
|
8649
8668
|
if (!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) || !this.boundSharedStateScope) return (null == previousScopes ? void 0 : previousScopes.size) && (previousScopes.forEach(scope => {
|
|
8650
8669
|
scope.subtreeActiveDescendants.delete(this);
|
|
8651
8670
|
}), previousScopes.clear()), void (this.registeredActiveScopes = void 0);
|
|
8671
|
+
if ((null == previousScopes ? void 0 : previousScopes.size) && this.isSharedStateScopeChainRegistered(previousScopes)) return;
|
|
8652
8672
|
const nextScopes = new Set(collectSharedStateScopeChain(this.boundSharedStateScope));
|
|
8653
8673
|
null == previousScopes || previousScopes.forEach(scope => {
|
|
8654
8674
|
nextScopes.has(scope) || scope.subtreeActiveDescendants.delete(this);
|
|
@@ -8656,6 +8676,15 @@ class GraphicImpl extends Node {
|
|
|
8656
8676
|
scope.subtreeActiveDescendants.add(this);
|
|
8657
8677
|
}), this.registeredActiveScopes = nextScopes;
|
|
8658
8678
|
}
|
|
8679
|
+
isSharedStateScopeChainRegistered(previousScopes) {
|
|
8680
|
+
let scope = this.boundSharedStateScope,
|
|
8681
|
+
scopeCount = 0;
|
|
8682
|
+
for (; scope;) {
|
|
8683
|
+
if (!previousScopes.has(scope)) return !1;
|
|
8684
|
+
scopeCount += 1, scope = scope.parentScope;
|
|
8685
|
+
}
|
|
8686
|
+
return scopeCount === previousScopes.size;
|
|
8687
|
+
}
|
|
8659
8688
|
clearSharedStateActiveRegistrations() {
|
|
8660
8689
|
const previousScopes = this.registeredActiveScopes;
|
|
8661
8690
|
previousScopes && (previousScopes.forEach(scope => {
|
|
@@ -8665,8 +8694,8 @@ class GraphicImpl extends Node {
|
|
|
8665
8694
|
markSharedStateDirty() {
|
|
8666
8695
|
this.sharedStateDirty = !0, enqueueGraphicSharedStateRefresh(this.stage, this), scheduleStageSharedStateRefresh(this.stage);
|
|
8667
8696
|
}
|
|
8668
|
-
onParentSharedStateTreeChanged(stage, layer) {
|
|
8669
|
-
this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingOnTreeChange() : this.setStage(stage, layer);
|
|
8697
|
+
onParentSharedStateTreeChanged(stage, layer, inheritedSharedStateScope) {
|
|
8698
|
+
this.stage === stage && this.layer === layer ? this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope) : this.setStage(stage, layer, inheritedSharedStateScope);
|
|
8670
8699
|
}
|
|
8671
8700
|
refreshSharedStateBeforeRender() {
|
|
8672
8701
|
var _a;
|
|
@@ -9317,6 +9346,10 @@ class GraphicImpl extends Node {
|
|
|
9317
9346
|
var _a;
|
|
9318
9347
|
return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
|
|
9319
9348
|
}
|
|
9349
|
+
setStateDefinitionsWithCompiled(definitions, compiledDefinitions) {
|
|
9350
|
+
var _a;
|
|
9351
|
+
this.states = definitions, this.localStateDefinitionsSource !== definitions && (this.localStateDefinitionsSource = definitions, this.localStateDefinitionsVersion = (null !== (_a = this.localStateDefinitionsVersion) && void 0 !== _a ? _a : 0) + 1), this.compiledStateDefinitions = compiledDefinitions, this.compiledStateDefinitionsCacheKey = `local:${this.localStateDefinitionsVersion}`;
|
|
9352
|
+
}
|
|
9320
9353
|
getStateResolveBaseAttrs() {
|
|
9321
9354
|
var _a;
|
|
9322
9355
|
return null !== (_a = this.baseAttributes) && void 0 !== _a ? _a : this.attribute;
|
|
@@ -9510,8 +9543,10 @@ class GraphicImpl extends Node {
|
|
|
9510
9543
|
transition.changed && this.useStates(transition.states, hasAnimation);
|
|
9511
9544
|
}
|
|
9512
9545
|
addState(stateName, keepCurrentStates, hasAnimation) {
|
|
9513
|
-
const
|
|
9514
|
-
|
|
9546
|
+
const currentStates = this.currentStates;
|
|
9547
|
+
if ((null == currentStates ? void 0 : currentStates.includes(stateName)) && (keepCurrentStates || 1 === currentStates.length)) return;
|
|
9548
|
+
const nextStates = keepCurrentStates && (null == currentStates ? void 0 : currentStates.length) ? currentStates.concat([stateName]) : [stateName];
|
|
9549
|
+
this.useStates(nextStates, hasAnimation);
|
|
9515
9550
|
}
|
|
9516
9551
|
setStates(states, options) {
|
|
9517
9552
|
var _a, _b, _c;
|
|
@@ -9664,12 +9699,12 @@ class GraphicImpl extends Node {
|
|
|
9664
9699
|
this._globalTransMatrix.translate(scrollX, scrollY);
|
|
9665
9700
|
}
|
|
9666
9701
|
}
|
|
9667
|
-
setStage(stage, layer) {
|
|
9702
|
+
setStage(stage, layer, inheritedSharedStateScope) {
|
|
9668
9703
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
9669
9704
|
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.graphicService,
|
|
9670
9705
|
previousStage = this.stage;
|
|
9671
9706
|
if (this.stage !== stage || this.layer !== layer) {
|
|
9672
|
-
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), this.setStageToShadowRoot(stage, layer), this.mayHaveTrackedAnimates() && this.hasAnyTrackedAnimate()) {
|
|
9707
|
+
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), this.setStageToShadowRoot(stage, layer), this.mayHaveTrackedAnimates() && this.hasAnyTrackedAnimate()) {
|
|
9673
9708
|
const previousTimeline = null === (_f = null == previousStage ? void 0 : previousStage.getTimeline) || void 0 === _f ? void 0 : _f.call(previousStage),
|
|
9674
9709
|
nextTimeline = null === (_g = null == stage ? void 0 : stage.getTimeline) || void 0 === _g ? void 0 : _g.call(stage),
|
|
9675
9710
|
detachedStageAnimates = [];
|
|
@@ -9686,7 +9721,7 @@ class GraphicImpl extends Node {
|
|
|
9686
9721
|
}
|
|
9687
9722
|
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));
|
|
9688
9723
|
}
|
|
9689
|
-
((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);
|
|
9724
|
+
((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);
|
|
9690
9725
|
}
|
|
9691
9726
|
detachStageForRelease() {
|
|
9692
9727
|
var _a, _b, _c;
|
|
@@ -10075,17 +10110,17 @@ class Group extends Graphic {
|
|
|
10075
10110
|
}
|
|
10076
10111
|
incrementalAppendChild(node) {
|
|
10077
10112
|
const data = super.appendChild(node);
|
|
10078
|
-
return data && this.syncChildSharedStateTreeBinding(data), this.addUpdateBoundTag(), this.getGraphicService().onAddIncremental(node, this, this.stage), data;
|
|
10113
|
+
return data && this.shouldSyncChildSharedStateTreeBinding(data) && this.syncChildSharedStateTreeBinding(data), this.addUpdateBoundTag(), this.getGraphicService().onAddIncremental(node, this, this.stage), data;
|
|
10079
10114
|
}
|
|
10080
10115
|
incrementalClearChild() {
|
|
10081
10116
|
super.removeAllChild(), this.addUpdateBoundTag(), this.getGraphicService().onClearIncremental(this, this.stage);
|
|
10082
10117
|
}
|
|
10083
10118
|
_updateChildToStage(child) {
|
|
10084
|
-
return child && this.syncChildSharedStateTreeBinding(child), this.addUpdateBoundTag(), child;
|
|
10119
|
+
return child && this.shouldSyncChildSharedStateTreeBinding(child) && this.syncChildSharedStateTreeBinding(child), this.addUpdateBoundTag(), child;
|
|
10085
10120
|
}
|
|
10086
10121
|
appendChild(node, addStage = !0) {
|
|
10087
10122
|
const data = super.appendChild(node);
|
|
10088
|
-
return data && addStage && this.syncChildSharedStateTreeBinding(data), this.addUpdateBoundTag(), data;
|
|
10123
|
+
return data && addStage && this.shouldSyncChildSharedStateTreeBinding(data) && this.syncChildSharedStateTreeBinding(data), this.addUpdateBoundTag(), data;
|
|
10089
10124
|
}
|
|
10090
10125
|
insertBefore(newNode, referenceNode) {
|
|
10091
10126
|
return this._updateChildToStage(super.insertBefore(newNode, referenceNode));
|
|
@@ -10108,13 +10143,13 @@ class Group extends Graphic {
|
|
|
10108
10143
|
child.setStage(null, null);
|
|
10109
10144
|
}), this.addUpdateBoundTag();
|
|
10110
10145
|
}
|
|
10111
|
-
setStage(stage, layer) {
|
|
10146
|
+
setStage(stage, layer, inheritedSharedStateScope) {
|
|
10112
10147
|
var _a, _b, _c, _d, _e, _f;
|
|
10113
10148
|
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.graphicService,
|
|
10114
10149
|
needsSharedStateTreeSync = this.hasSharedStateDefinitions() || this.sharedStateScope || (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;
|
|
10115
|
-
if (this.stage !== stage) return this.stage = stage, this.layer = layer, needsSharedStateTreeSync && (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0)), this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_f = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _f || _f.call(graphicService, this, stage), void this.notifyChildrenSharedStateTreeChanged();
|
|
10150
|
+
if (this.stage !== stage) return this.stage = stage, this.layer = layer, needsSharedStateTreeSync && (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope)), this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_f = null == graphicService ? void 0 : graphicService.onSetStage) || void 0 === _f || _f.call(graphicService, this, stage), void this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope);
|
|
10116
10151
|
const layerChanged = this.layer !== layer;
|
|
10117
|
-
layerChanged && (this.layer = layer), needsSharedStateTreeSync ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0), this.notifyChildrenSharedStateTreeChanged()) : layerChanged && this.notifyChildrenSharedStateTreeChanged();
|
|
10152
|
+
layerChanged && (this.layer = layer), needsSharedStateTreeSync ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!0, inheritedSharedStateScope), this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope)) : layerChanged && this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope);
|
|
10118
10153
|
}
|
|
10119
10154
|
addUpdatePositionTag() {
|
|
10120
10155
|
super.addUpdatePositionTag(), this.forEachChildren(g => {
|
|
@@ -10173,17 +10208,29 @@ class Group extends Graphic {
|
|
|
10173
10208
|
hasSharedStateDefinitions() {
|
|
10174
10209
|
return !!this._sharedStateDefinitions && Object.keys(this._sharedStateDefinitions).length > 0;
|
|
10175
10210
|
}
|
|
10176
|
-
|
|
10211
|
+
resolveChildSharedStateScope(inheritedSharedStateScope) {
|
|
10212
|
+
var _a;
|
|
10213
|
+
return this.sharedStateScope ? this.sharedStateScope : void 0 !== inheritedSharedStateScope ? inheritedSharedStateScope : null !== (_a = this.resolveBoundSharedStateScope()) && void 0 !== _a ? _a : null;
|
|
10214
|
+
}
|
|
10215
|
+
notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope) {
|
|
10216
|
+
const childSharedStateScope = this.resolveChildSharedStateScope(inheritedSharedStateScope);
|
|
10177
10217
|
this.forEachChildren(item => {
|
|
10178
|
-
this.
|
|
10218
|
+
this.setStageToChild(item, childSharedStateScope);
|
|
10179
10219
|
});
|
|
10180
10220
|
}
|
|
10181
|
-
|
|
10182
|
-
|
|
10221
|
+
shouldSyncChildSharedStateTreeBinding(child) {
|
|
10222
|
+
return !(!this.stage && !this.layer) || child.onParentSharedStateTreeChanged !== Graphic.prototype.onParentSharedStateTreeChanged && child.onParentSharedStateTreeChanged !== Group.prototype.onParentSharedStateTreeChanged;
|
|
10223
|
+
}
|
|
10224
|
+
setStageToChild(child, inheritedSharedStateScope) {
|
|
10225
|
+
const graphic = child;
|
|
10226
|
+
"function" != typeof graphic.setStage || child.onParentSharedStateTreeChanged !== Graphic.prototype.onParentSharedStateTreeChanged && child.onParentSharedStateTreeChanged !== Group.prototype.onParentSharedStateTreeChanged || graphic.stage === this.stage && graphic.layer === this.layer ? child.onParentSharedStateTreeChanged(this.stage, this.layer, inheritedSharedStateScope) : graphic.setStage(this.stage, this.layer, inheritedSharedStateScope);
|
|
10183
10227
|
}
|
|
10184
|
-
|
|
10228
|
+
syncChildSharedStateTreeBinding(child, inheritedSharedStateScope) {
|
|
10229
|
+
void 0 === inheritedSharedStateScope && (inheritedSharedStateScope = this.resolveChildSharedStateScope()), this.setStageToChild(child, inheritedSharedStateScope);
|
|
10230
|
+
}
|
|
10231
|
+
onParentSharedStateTreeChanged(stage, layer, inheritedSharedStateScope) {
|
|
10185
10232
|
var _a;
|
|
10186
|
-
this.stage === stage && this.layer === layer ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length)), this.notifyChildrenSharedStateTreeChanged()) : this.setStage(stage, layer);
|
|
10233
|
+
this.stage === stage && this.layer === layer ? (this.ensureSharedStateScopeBound(), this.syncSharedStateScopeBindingOnTreeChange(!!(null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length), inheritedSharedStateScope), this.notifyChildrenSharedStateTreeChanged(inheritedSharedStateScope)) : this.setStage(stage, layer, inheritedSharedStateScope);
|
|
10187
10234
|
}
|
|
10188
10235
|
}
|
|
10189
10236
|
Group.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
|
|
@@ -13557,8 +13604,8 @@ class RichText extends Graphic {
|
|
|
13557
13604
|
clone() {
|
|
13558
13605
|
return new RichText(Object.assign({}, this.attribute));
|
|
13559
13606
|
}
|
|
13560
|
-
setStage(stage, layer) {
|
|
13561
|
-
super.setStage(stage, layer);
|
|
13607
|
+
setStage(stage, layer, inheritedSharedStateScope) {
|
|
13608
|
+
super.setStage(stage, layer, inheritedSharedStateScope);
|
|
13562
13609
|
this.getFrameCache().icons.forEach(icon => {
|
|
13563
13610
|
icon.setStage(stage, layer);
|
|
13564
13611
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vrender-kits",
|
|
3
|
-
"version": "1.1.4-alpha.
|
|
3
|
+
"version": "1.1.4-alpha.2",
|
|
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.4-alpha.
|
|
47
|
+
"@visactor/vrender-core": "1.1.4-alpha.2",
|
|
48
48
|
"@resvg/resvg-js": "2.4.1",
|
|
49
49
|
"roughjs": "4.6.6",
|
|
50
50
|
"gifuct-js": "2.1.2",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"vite": "3.2.6",
|
|
70
70
|
"typescript": "4.9.5",
|
|
71
71
|
"cross-env": "^7.0.3",
|
|
72
|
-
"@internal/
|
|
72
|
+
"@internal/ts-config": "0.0.1",
|
|
73
73
|
"@internal/bundler": "0.0.1",
|
|
74
|
-
"@internal/
|
|
74
|
+
"@internal/eslint-config": "0.0.1"
|
|
75
75
|
},
|
|
76
76
|
"keywords": [
|
|
77
77
|
"VisActor",
|