@visactor/vrender-core 0.23.0-alpha.2 → 1.0.0-alpha.1
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/empty-context.d.ts +1 -0
- package/cjs/canvas/empty-context.js +4 -0
- package/cjs/canvas/empty-context.js.map +1 -1
- package/cjs/color-string/index.js +2 -1
- package/cjs/common/diff.d.ts +1 -0
- package/cjs/common/diff.js +19 -0
- package/cjs/common/diff.js.map +1 -0
- package/cjs/common/enums.d.ts +0 -16
- package/cjs/common/enums.js +2 -11
- package/cjs/common/enums.js.map +1 -1
- package/cjs/common/path-svg.js +2 -1
- package/cjs/common/performance-raf.d.ts +2 -0
- package/cjs/common/performance-raf.js +8 -3
- package/cjs/common/performance-raf.js.map +1 -1
- package/cjs/common/split-path.js +1 -2
- package/cjs/core/global-module.js +2 -0
- package/cjs/core/global.d.ts +3 -0
- package/cjs/core/global.js +13 -3
- package/cjs/core/global.js.map +1 -1
- package/cjs/core/stage.d.ts +1 -0
- package/cjs/core/stage.js +7 -6
- package/cjs/core/stage.js.map +1 -1
- package/cjs/event/event-system.js +6 -7
- package/cjs/event/event-system.js.map +1 -1
- package/cjs/event/federated-event/base-event.js +1 -1
- package/cjs/event/federated-event/base-event.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +3 -9
- package/cjs/graphic/graphic.js +13 -80
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/richtext/paragraph.d.ts +3 -0
- package/cjs/graphic/richtext/paragraph.js +14 -10
- package/cjs/graphic/richtext/paragraph.js.map +1 -1
- package/cjs/graphic/richtext/utils.js +12 -2
- package/cjs/graphic/richtext/utils.js.map +1 -1
- package/cjs/graphic/richtext.d.ts +3 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +7 -6
- package/cjs/index.js.map +1 -1
- package/cjs/interface/animate.d.ts +1 -165
- package/cjs/interface/animate.js +1 -4
- package/cjs/interface/animate.js.map +1 -1
- package/cjs/interface/animation/animate.d.ts +100 -0
- package/cjs/interface/animation/animate.js +10 -0
- package/cjs/interface/animation/animate.js.map +1 -0
- package/cjs/interface/animation/easing.d.ts +3 -0
- package/cjs/interface/animation/easing.js +6 -0
- package/cjs/interface/animation/easing.js.map +1 -0
- package/cjs/interface/animation/index.d.ts +5 -0
- package/cjs/interface/animation/index.js +23 -0
- package/cjs/interface/animation/index.js.map +1 -0
- package/cjs/interface/animation/ticker.d.ts +37 -0
- package/cjs/interface/animation/ticker.js +11 -0
- package/cjs/interface/animation/ticker.js.map +1 -0
- package/cjs/interface/animation/timeline.d.ts +17 -0
- package/cjs/interface/animation/timeline.js +6 -0
- package/cjs/interface/animation/timeline.js.map +1 -0
- package/cjs/interface/animation/type.d.ts +13 -0
- package/cjs/interface/animation/type.js +15 -0
- package/cjs/interface/animation/type.js.map +1 -0
- package/cjs/interface/context.d.ts +1 -0
- package/cjs/interface/context.js.map +1 -1
- package/cjs/interface/global.d.ts +2 -0
- package/cjs/interface/global.js.map +1 -1
- package/cjs/interface/graphic/richText.d.ts +3 -0
- package/cjs/interface/graphic/richText.js.map +1 -1
- package/cjs/interface/graphic.d.ts +2 -2
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/index.d.ts +1 -1
- package/cjs/interface/index.js +1 -1
- package/cjs/interface/index.js.map +1 -1
- package/cjs/interface/render.d.ts +6 -0
- package/cjs/interface/render.js.map +1 -1
- package/cjs/interface/stage.d.ts +2 -2
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/plugins/builtin-plugin/edit-module.js +11 -8
- package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/cjs/render/contributions/render/arc-render.d.ts +4 -2
- package/cjs/render/contributions/render/arc-render.js +19 -17
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/base-render.d.ts +2 -2
- package/cjs/render/contributions/render/base-render.js +2 -2
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-contribution.d.ts +1 -0
- package/cjs/render/contributions/render/draw-contribution.js +23 -19
- package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.js +1 -0
- package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
- package/cjs/render/contributions/render/group-render.d.ts +2 -2
- package/cjs/render/contributions/render/group-render.js +14 -10
- package/cjs/render/contributions/render/group-render.js.map +1 -1
- package/cjs/render/contributions/render/rect-render.d.ts +3 -1
- package/cjs/render/contributions/render/rect-render.js +17 -15
- package/cjs/render/contributions/render/rect-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol-render.d.ts +4 -2
- package/cjs/render/contributions/render/symbol-render.js +16 -11
- package/cjs/render/contributions/render/symbol-render.js.map +1 -1
- package/dist/index.es.js +643 -670
- package/es/canvas/empty-context.d.ts +1 -0
- package/es/canvas/empty-context.js +4 -0
- package/es/canvas/empty-context.js.map +1 -1
- package/es/color-string/index.js +2 -1
- package/es/common/diff.d.ts +1 -0
- package/es/common/diff.js +11 -0
- package/es/common/diff.js.map +1 -0
- package/es/common/enums.d.ts +0 -16
- package/es/common/enums.js +0 -20
- package/es/common/enums.js.map +1 -1
- package/es/common/path-svg.js +2 -1
- package/es/common/performance-raf.d.ts +2 -0
- package/es/common/performance-raf.js +8 -3
- package/es/common/performance-raf.js.map +1 -1
- package/es/common/split-path.js +1 -2
- package/es/core/global-module.js +2 -0
- package/es/core/global.d.ts +3 -0
- package/es/core/global.js +14 -2
- package/es/core/global.js.map +1 -1
- package/es/core/stage.d.ts +1 -0
- package/es/core/stage.js +7 -6
- package/es/core/stage.js.map +1 -1
- package/es/event/event-system.js +6 -7
- package/es/event/event-system.js.map +1 -1
- package/es/event/federated-event/base-event.js +1 -1
- package/es/event/federated-event/base-event.js.map +1 -1
- package/es/graphic/graphic.d.ts +3 -9
- package/es/graphic/graphic.js +13 -82
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/richtext/paragraph.d.ts +3 -0
- package/es/graphic/richtext/paragraph.js +14 -10
- package/es/graphic/richtext/paragraph.js.map +1 -1
- package/es/graphic/richtext/utils.js +12 -2
- package/es/graphic/richtext/utils.js.map +1 -1
- package/es/graphic/richtext.d.ts +3 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/es/interface/animate.d.ts +1 -165
- package/es/interface/animate.js +2 -1
- package/es/interface/animate.js.map +1 -1
- package/es/interface/animation/animate.d.ts +100 -0
- package/es/interface/animation/animate.js +6 -0
- package/es/interface/animation/animate.js.map +1 -0
- package/es/interface/animation/easing.d.ts +3 -0
- package/es/interface/animation/easing.js +2 -0
- package/es/interface/animation/easing.js.map +1 -0
- package/es/interface/animation/index.d.ts +5 -0
- package/es/interface/animation/index.js +10 -0
- package/es/interface/animation/index.js.map +1 -0
- package/es/interface/animation/ticker.d.ts +37 -0
- package/es/interface/animation/ticker.js +7 -0
- package/es/interface/animation/ticker.js.map +1 -0
- package/es/interface/animation/timeline.d.ts +17 -0
- package/es/interface/animation/timeline.js +2 -0
- package/es/interface/animation/timeline.js.map +1 -0
- package/es/interface/animation/type.d.ts +13 -0
- package/es/interface/animation/type.js +14 -0
- package/es/interface/animation/type.js.map +1 -0
- package/es/interface/context.d.ts +1 -0
- package/es/interface/context.js.map +1 -1
- package/es/interface/global.d.ts +2 -0
- package/es/interface/global.js.map +1 -1
- package/es/interface/graphic/richText.d.ts +3 -0
- package/es/interface/graphic/richText.js.map +1 -1
- package/es/interface/graphic.d.ts +2 -2
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/index.d.ts +1 -1
- package/es/interface/index.js +1 -1
- package/es/interface/index.js.map +1 -1
- package/es/interface/render.d.ts +6 -0
- package/es/interface/render.js.map +1 -1
- package/es/interface/stage.d.ts +2 -2
- package/es/interface/stage.js.map +1 -1
- package/es/plugins/builtin-plugin/edit-module.js +11 -8
- package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/es/render/contributions/render/arc-render.d.ts +4 -2
- package/es/render/contributions/render/arc-render.js +19 -17
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/base-render.d.ts +2 -2
- package/es/render/contributions/render/base-render.js +2 -2
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/draw-contribution.d.ts +1 -0
- package/es/render/contributions/render/draw-contribution.js +23 -19
- package/es/render/contributions/render/draw-contribution.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.js +1 -0
- package/es/render/contributions/render/draw-interceptor.js.map +1 -1
- package/es/render/contributions/render/group-render.d.ts +2 -2
- package/es/render/contributions/render/group-render.js +14 -10
- package/es/render/contributions/render/group-render.js.map +1 -1
- package/es/render/contributions/render/rect-render.d.ts +3 -1
- package/es/render/contributions/render/rect-render.js +17 -14
- package/es/render/contributions/render/rect-render.js.map +1 -1
- package/es/render/contributions/render/symbol-render.d.ts +4 -2
- package/es/render/contributions/render/symbol-render.js +16 -11
- package/es/render/contributions/render/symbol-render.js.map +1 -1
- package/package.json +4 -4
package/es/graphic/graphic.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Dict, IPointLike, IAABBBounds, IOBBBounds } from '@visactor/vutils
|
|
|
3
3
|
import { Matrix, Point } from '@visactor/vutils';
|
|
4
4
|
import type { GraphicType, IAnimateConfig, IGraphicAttribute, IGraphic, IGraphicJson, ISetAttributeContext, ITransform, GraphicReleaseStatus } from '../interface/graphic';
|
|
5
5
|
import { Node } from './node-tree';
|
|
6
|
-
import type { IAnimate, IAnimateTarget, IGlyphGraphicAttribute, ILayer, IPickerService, IShadowRoot, IStage, IStep,
|
|
6
|
+
import type { IAnimate, IAnimateTarget, IGlyphGraphicAttribute, ILayer, IPickerService, IShadowRoot, IStage, IStep, ISymbolClass } from '../interface';
|
|
7
7
|
import { IContainPointMode } from '../common/enums';
|
|
8
8
|
import { CustomSymbolClass } from './builtin-symbol';
|
|
9
9
|
export declare const PURE_STYLE_KEY: string[];
|
|
@@ -83,9 +83,6 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
83
83
|
stateProxy?: (stateName: string, targetStates?: string[]) => T;
|
|
84
84
|
animates: Map<string | number, IAnimate>;
|
|
85
85
|
animate?: () => IAnimate;
|
|
86
|
-
nextAttrs?: T;
|
|
87
|
-
prevAttrs?: T;
|
|
88
|
-
finalAttrs?: T;
|
|
89
86
|
pathProxy?: ICustomPath2D;
|
|
90
87
|
attachedThemeGraphic?: IGraphic;
|
|
91
88
|
protected updateAABBBoundsStamp: number;
|
|
@@ -97,7 +94,7 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
97
94
|
set3dMode(): void;
|
|
98
95
|
set2dMode(): void;
|
|
99
96
|
getOffsetXY(attr?: ITransform, includeScroll?: boolean): Point;
|
|
100
|
-
onAnimateBind(animate: IAnimate
|
|
97
|
+
onAnimateBind(animate: IAnimate): void;
|
|
101
98
|
protected tryUpdateAABBBounds(): IAABBBounds;
|
|
102
99
|
protected tryUpdateOBBBounds(): IOBBBounds;
|
|
103
100
|
protected combindShadowAABBBounds(bounds: IAABBBounds): void;
|
|
@@ -120,6 +117,7 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
120
117
|
shouldUpdateShape(): boolean;
|
|
121
118
|
clearUpdateShapeTag(): void;
|
|
122
119
|
containsPoint(x: number, y: number, mode: IContainPointMode, picker?: IPickerService): boolean;
|
|
120
|
+
setAttributesAndPreventAnimate(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
123
121
|
setAttributes(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
124
122
|
_setAttributes(params: Partial<T>, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
125
123
|
setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext): void;
|
|
@@ -170,10 +168,6 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
|
|
|
170
168
|
setStageToShadowRoot(stage?: IStage, layer?: ILayer): void;
|
|
171
169
|
onAddStep(step: IStep): void;
|
|
172
170
|
onStop(props?: Partial<T>): void;
|
|
173
|
-
onStep(subAnimate: ISubAnimate, animate: IAnimate, step: IStep, ratio: number, end: boolean): void;
|
|
174
|
-
stepInterpolate(subAnimate: ISubAnimate, animate: IAnimate, nextAttributes: Record<string, any>, step: IStep, ratio: number, end: boolean, nextProps: Record<string, any>, lastProps?: Record<string, any>, nextParsedProps?: any, propKeys?: string[]): void;
|
|
175
|
-
defaultInterpolate(nextStepVal: any, lastStepVal: any, key: string, nextAttributes: Record<string, any>, nextParsedProps: any, ratio: number): boolean;
|
|
176
|
-
protected _interpolate(key: string, ratio: number, lastStepVal: any, nextStepVal: any, nextAttributes: any): void;
|
|
177
171
|
getDefaultAttribute(name: string): any;
|
|
178
172
|
getComputedAttribute(name: string): any;
|
|
179
173
|
onSetStage(cb: (g: IGraphic, stage: IStage) => void, immediate?: boolean): void;
|
package/es/graphic/graphic.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isArray, max, OBBBounds } from "@visactor/vutils";
|
|
2
2
|
|
|
3
|
-
import { AABBBounds, Matrix, normalTransform, Point, isNil,
|
|
3
|
+
import { AABBBounds, Matrix, normalTransform, Point, isNil, isString, isValidUrl, isBase64, isObject } from "@visactor/vutils";
|
|
4
4
|
|
|
5
5
|
import { Node } from "./node-tree";
|
|
6
6
|
|
|
@@ -10,8 +10,6 @@ import { DefaultTransform } from "./config";
|
|
|
10
10
|
|
|
11
11
|
import { application } from "../application";
|
|
12
12
|
|
|
13
|
-
import { interpolateColor } from "../color-string/interpolate";
|
|
14
|
-
|
|
15
13
|
import { CustomPath2D } from "../common/custom-path2d";
|
|
16
14
|
|
|
17
15
|
import { ResourceLoader } from "../resource-loader/loader";
|
|
@@ -259,6 +257,13 @@ export class Graphic extends Node {
|
|
|
259
257
|
y: y
|
|
260
258
|
});
|
|
261
259
|
}
|
|
260
|
+
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context) {
|
|
261
|
+
this.setAttributes(params, forceUpdateTag, context), this.animates && this.animates.forEach((animate => {
|
|
262
|
+
Object.keys(params).forEach((key => {
|
|
263
|
+
animate.preventAttr(key);
|
|
264
|
+
}));
|
|
265
|
+
}));
|
|
266
|
+
}
|
|
262
267
|
setAttributes(params, forceUpdateTag = !1, context) {
|
|
263
268
|
(params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic),
|
|
264
269
|
this._setAttributes(params, forceUpdateTag, context);
|
|
@@ -429,10 +434,10 @@ export class Graphic extends Node {
|
|
|
429
434
|
duration: stateAnimateConfig.duration,
|
|
430
435
|
easing: stateAnimateConfig.easing
|
|
431
436
|
}
|
|
432
|
-
} ]), noAnimateAttrs && this.
|
|
437
|
+
} ]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
|
|
433
438
|
type: AttributeUpdateType.STATE
|
|
434
439
|
});
|
|
435
|
-
} else this.stopStateAnimates(), this.
|
|
440
|
+
} else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
|
|
436
441
|
type: AttributeUpdateType.STATE
|
|
437
442
|
});
|
|
438
443
|
}
|
|
@@ -452,13 +457,9 @@ export class Graphic extends Node {
|
|
|
452
457
|
}));
|
|
453
458
|
}
|
|
454
459
|
getNormalAttribute(key) {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
const endProps = animate.getEndProps();
|
|
459
|
-
has(endProps, key) && (value = endProps[key]);
|
|
460
|
-
}
|
|
461
|
-
})), value;
|
|
460
|
+
var _a, _b;
|
|
461
|
+
const value = this.attribute[key];
|
|
462
|
+
return this.animates ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
|
|
462
463
|
}
|
|
463
464
|
clearStates(hasAnimation) {
|
|
464
465
|
this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [],
|
|
@@ -603,76 +604,6 @@ export class Graphic extends Node {
|
|
|
603
604
|
type: AttributeUpdateType.ANIMATE_END
|
|
604
605
|
});
|
|
605
606
|
}
|
|
606
|
-
onStep(subAnimate, animate, step, ratio, end) {
|
|
607
|
-
const nextAttributes = {};
|
|
608
|
-
if (step.customAnimate) step.customAnimate.update(end, ratio, nextAttributes); else {
|
|
609
|
-
const nextProps = step.props, nextParsedProps = step.parsedProps, propKeys = step.propKeys;
|
|
610
|
-
this.stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, void 0, nextParsedProps, propKeys);
|
|
611
|
-
}
|
|
612
|
-
this.setAttributes(nextAttributes, !1, {
|
|
613
|
-
type: AttributeUpdateType.ANIMATE_UPDATE,
|
|
614
|
-
animationState: {
|
|
615
|
-
ratio: ratio,
|
|
616
|
-
end: end,
|
|
617
|
-
step: step,
|
|
618
|
-
isFirstFrameOfStep: subAnimate.getLastStep() !== step
|
|
619
|
-
}
|
|
620
|
-
}), this.stage && this.stage.renderNextFrame();
|
|
621
|
-
}
|
|
622
|
-
stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, lastProps, nextParsedProps, propKeys) {
|
|
623
|
-
propKeys || (propKeys = Object.keys(nextProps), step.propKeys = propKeys), end ? step.propKeys.forEach((key => {
|
|
624
|
-
animate.validAttr(key) && (nextAttributes[key] = nextProps[key]);
|
|
625
|
-
})) : propKeys.forEach((key => {
|
|
626
|
-
var _a;
|
|
627
|
-
if (!animate.validAttr(key)) return;
|
|
628
|
-
const nextStepVal = nextProps[key], lastStepVal = null !== (_a = lastProps && lastProps[key]) && void 0 !== _a ? _a : subAnimate.getLastPropByName(key, step);
|
|
629
|
-
if (null == nextStepVal || null == lastStepVal || nextStepVal === lastStepVal) return void (nextAttributes[key] = nextStepVal);
|
|
630
|
-
let match;
|
|
631
|
-
match = animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes),
|
|
632
|
-
match || (match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, this, nextAttributes),
|
|
633
|
-
match || this.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) || this._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes));
|
|
634
|
-
})), step.parsedProps = nextParsedProps;
|
|
635
|
-
}
|
|
636
|
-
defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) {
|
|
637
|
-
if (Number.isFinite(nextStepVal) && Number.isFinite(lastStepVal)) return nextAttributes[key] = lastStepVal + (nextStepVal - lastStepVal) * ratio,
|
|
638
|
-
!0;
|
|
639
|
-
if ("fill" === key) {
|
|
640
|
-
nextParsedProps || (nextParsedProps = {});
|
|
641
|
-
const fillColorArray = nextParsedProps.fillColorArray, color = interpolateColor(lastStepVal, null != fillColorArray ? fillColorArray : nextStepVal, ratio, !1, ((fArray, tArray) => {
|
|
642
|
-
nextParsedProps.fillColorArray = tArray;
|
|
643
|
-
}));
|
|
644
|
-
return color && (nextAttributes[key] = color), !0;
|
|
645
|
-
}
|
|
646
|
-
if ("stroke" === key) {
|
|
647
|
-
nextParsedProps || (nextParsedProps = {});
|
|
648
|
-
const strokeColorArray = nextParsedProps.strokeColorArray, color = interpolateColor(lastStepVal, null != strokeColorArray ? strokeColorArray : nextStepVal, ratio, !1, ((fArray, tArray) => {
|
|
649
|
-
nextParsedProps.strokeColorArray = tArray;
|
|
650
|
-
}));
|
|
651
|
-
return color && (nextAttributes[key] = color), !0;
|
|
652
|
-
}
|
|
653
|
-
if ("shadowColor" === key) {
|
|
654
|
-
nextParsedProps || (nextParsedProps = {});
|
|
655
|
-
const shadowColorArray = nextParsedProps.shadowColorArray, color = interpolateColor(lastStepVal, null != shadowColorArray ? shadowColorArray : nextStepVal, ratio, !0, ((fArray, tArray) => {
|
|
656
|
-
nextParsedProps.shadowColorArray = tArray;
|
|
657
|
-
}));
|
|
658
|
-
return color && (nextAttributes[key] = color), !0;
|
|
659
|
-
}
|
|
660
|
-
if (Array.isArray(nextStepVal) && nextStepVal.length === lastStepVal.length) {
|
|
661
|
-
const nextList = [];
|
|
662
|
-
let valid = !0;
|
|
663
|
-
for (let i = 0; i < nextStepVal.length; i++) {
|
|
664
|
-
const v = lastStepVal[i], val = v + (nextStepVal[i] - v) * ratio;
|
|
665
|
-
if (!Number.isFinite(val)) {
|
|
666
|
-
valid = !1;
|
|
667
|
-
break;
|
|
668
|
-
}
|
|
669
|
-
nextList.push(val);
|
|
670
|
-
}
|
|
671
|
-
valid && (nextAttributes[key] = nextList);
|
|
672
|
-
}
|
|
673
|
-
return !1;
|
|
674
|
-
}
|
|
675
|
-
_interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {}
|
|
676
607
|
getDefaultAttribute(name) {
|
|
677
608
|
return this.getGraphicTheme()[name];
|
|
678
609
|
}
|