@visactor/vrender-core 1.1.0-alpha.20 → 1.1.0-alpha.21
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/cjs/canvas/constants.js +1 -2
- package/cjs/color-string/index.js +2 -1
- package/cjs/graphic/graphic.d.ts +1 -0
- package/cjs/graphic/graphic.js +9 -1
- package/cjs/graphic/graphic.js.map +1 -1
- package/dist/index.es.js +16 -0
- package/es/canvas/constants.js +1 -2
- package/es/color-string/index.js +2 -1
- package/es/graphic/graphic.d.ts +1 -0
- package/es/graphic/graphic.js +9 -1
- package/es/graphic/graphic.js.map +1 -1
- package/package.json +3 -3
package/cjs/canvas/constants.js
CHANGED
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.Context2dFactory = exports.CanvasFactory = void 0, exports.CanvasFactory = Symbol.for("CanvasFactory"),
|
|
6
|
-
exports.Context2dFactory = Symbol.for("Context2dFactory");
|
|
7
|
-
//# sourceMappingURL=constants.js.map
|
|
6
|
+
exports.Context2dFactory = Symbol.for("Context2dFactory");
|
|
@@ -18,4 +18,5 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
20
|
}), __exportStar(require("./interpolate"), exports), __exportStar(require("./store"), exports),
|
|
21
|
-
__exportStar(require("./colorName"), exports);
|
|
21
|
+
__exportStar(require("./colorName"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
package/cjs/graphic/graphic.d.ts
CHANGED
|
@@ -223,6 +223,7 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
223
223
|
containsPoint(x: number, y: number, mode: IContainPointMode, picker?: IPickerService): boolean;
|
|
224
224
|
protected setWidthHeightWithoutTransform(aabbBounds: IAABBBounds): void;
|
|
225
225
|
setAttributesAndPreventAnimate(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext, ignorePriority?: boolean): void;
|
|
226
|
+
protected syncFinalAttributesFromUpdateContext(context?: ISetAttributeContext): void;
|
|
226
227
|
protected captureTransientFromAttrsBeforePreventAnimate(params: Partial<T>, keys: string[], context?: ISetAttributeContext): void;
|
|
227
228
|
protected consumeTransientFromAttrsBeforePreventAnimate(diffAttrs: Record<string, any>): Record<string, any> | null;
|
|
228
229
|
setAttributes(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
package/cjs/graphic/graphic.js
CHANGED
|
@@ -647,10 +647,18 @@ class Graphic extends node_tree_1.Node {
|
|
|
647
647
|
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context, ignorePriority) {
|
|
648
648
|
if (!params) return;
|
|
649
649
|
const keys = Object.keys(params);
|
|
650
|
-
this.captureTransientFromAttrsBeforePreventAnimate(params, keys, context), this.
|
|
650
|
+
this.captureTransientFromAttrsBeforePreventAnimate(params, keys, context), this.syncFinalAttributesFromUpdateContext(context),
|
|
651
|
+
this.visitTrackedAnimates((animate => {
|
|
651
652
|
(animate.priority !== 1 / 0 || ignorePriority) && animate.preventAttrs(keys);
|
|
652
653
|
})), this.applyTransientAttributes(params, forceUpdateTag, context);
|
|
653
654
|
}
|
|
655
|
+
syncFinalAttributesFromUpdateContext(context) {
|
|
656
|
+
var _a;
|
|
657
|
+
const updateType = null == context ? void 0 : context.type;
|
|
658
|
+
if (updateType === enums_1.AttributeUpdateType.STATE || null != updateType && updateType >= enums_1.AttributeUpdateType.ANIMATE_BIND && updateType <= enums_1.AttributeUpdateType.ANIMATE_END) return;
|
|
659
|
+
const finalAttrs = null === (_a = this.context) || void 0 === _a ? void 0 : _a.finalAttrs, setFinalAttributes = this.setFinalAttributes;
|
|
660
|
+
finalAttrs && "function" == typeof setFinalAttributes && setFinalAttributes.call(this, finalAttrs);
|
|
661
|
+
}
|
|
654
662
|
captureTransientFromAttrsBeforePreventAnimate(params, keys, context) {
|
|
655
663
|
var _a, _b;
|
|
656
664
|
const graphicContext = this.context, diffAttrs = null !== (_a = null == graphicContext ? void 0 : graphicContext.diffAttrs) && void 0 !== _a ? _a : params, updateType = null == context ? void 0 : context.type;
|