@visactor/vchart-extension 2.0.0 → 2.0.1-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.
- package/build/index.js +22 -20
- package/build/index.min.js +1 -1
- package/cjs/charts/sequence-scatter-link/utils.d.ts +9 -0
- package/cjs/charts/sequence-scatter-link/utils.js +108 -0
- package/cjs/charts/sequence-scatter-link/utils.js.map +1 -0
- package/esm/charts/sequence-scatter-link/utils.d.ts +9 -0
- package/esm/charts/sequence-scatter-link/utils.js +100 -0
- package/esm/charts/sequence-scatter-link/utils.js.map +1 -0
- package/package.json +7 -7
package/build/index.js
CHANGED
|
@@ -10210,9 +10210,9 @@
|
|
|
10210
10210
|
setWidthHeightWithoutTransform(aabbBounds) {
|
|
10211
10211
|
this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
|
|
10212
10212
|
}
|
|
10213
|
-
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context) {
|
|
10213
|
+
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context, ignorePriority) {
|
|
10214
10214
|
this.setAttributes(params, forceUpdateTag, context), this.animates && this.animates.forEach(animate => {
|
|
10215
|
-
Object.keys(params).forEach(key => {
|
|
10215
|
+
(animate.priority !== 1 / 0 || ignorePriority) && Object.keys(params).forEach(key => {
|
|
10216
10216
|
animate.preventAttr(key);
|
|
10217
10217
|
});
|
|
10218
10218
|
});
|
|
@@ -10383,7 +10383,7 @@
|
|
|
10383
10383
|
});
|
|
10384
10384
|
} else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
|
|
10385
10385
|
type: AttributeUpdateType.STATE
|
|
10386
|
-
});
|
|
10386
|
+
}), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
|
|
10387
10387
|
this._emitCustomEvent("afterStateUpdate", {
|
|
10388
10388
|
type: AttributeUpdateType.STATE
|
|
10389
10389
|
});
|
|
@@ -17869,7 +17869,7 @@
|
|
|
17869
17869
|
return this._animateCount;
|
|
17870
17870
|
}
|
|
17871
17871
|
constructor() {
|
|
17872
|
-
super(), this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
|
|
17872
|
+
super(), this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this._animationEndFlag = !0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
|
|
17873
17873
|
}
|
|
17874
17874
|
isRunning() {
|
|
17875
17875
|
return !this.paused && this._animateCount > 0;
|
|
@@ -17898,10 +17898,11 @@
|
|
|
17898
17898
|
}
|
|
17899
17899
|
tick(delta) {
|
|
17900
17900
|
if (this.paused) return;
|
|
17901
|
+
this._animationEndFlag && (this._animationEndFlag = !1, this.emit("animationStart"));
|
|
17901
17902
|
const scaledDelta = delta * this._playSpeed;
|
|
17902
17903
|
this._currentTime += scaledDelta, this.forEachAccessAnimate((animate, i) => {
|
|
17903
17904
|
animate.status === AnimateStatus.END ? this.removeAnimate(animate, !0) : animate.status !== AnimateStatus.RUNNING && animate.status !== AnimateStatus.INITIAL || animate.advance(scaledDelta);
|
|
17904
|
-
}), 0 === this._animateCount && this.emit("animationEnd");
|
|
17905
|
+
}), 0 === this._animateCount && (this._animationEndFlag = !0, this.emit("animationEnd"));
|
|
17905
17906
|
}
|
|
17906
17907
|
clear() {
|
|
17907
17908
|
this.forEachAccessAnimate(animate => {
|
|
@@ -17965,7 +17966,9 @@
|
|
|
17965
17966
|
return this._timeline;
|
|
17966
17967
|
}
|
|
17967
17968
|
bind(target) {
|
|
17968
|
-
return this.target = target, this.target.
|
|
17969
|
+
return this.target = target, this.target.animates || (this.target.animates = new Map()), this.target.animates.set(this.id, this), this.onRemove(() => {
|
|
17970
|
+
this.stop(), this.target.animates.delete(this.id);
|
|
17971
|
+
}), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
17969
17972
|
}
|
|
17970
17973
|
to(props, duration = 300, easing = "linear") {
|
|
17971
17974
|
const step = new Step(AnimateStepType.to, props, duration, easing);
|
|
@@ -18179,8 +18182,8 @@
|
|
|
18179
18182
|
}
|
|
18180
18183
|
init() {
|
|
18181
18184
|
this.interval = 16, this.status = STATUS.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", () => {
|
|
18182
|
-
this.initHandler();
|
|
18183
|
-
}), application.global.env && this.initHandler();
|
|
18185
|
+
this.initHandler(!1);
|
|
18186
|
+
}), application.global.env && this.initHandler(!1);
|
|
18184
18187
|
}
|
|
18185
18188
|
addTimeline(timeline) {
|
|
18186
18189
|
this.timelines.push(timeline);
|
|
@@ -18191,10 +18194,11 @@
|
|
|
18191
18194
|
getTimelines() {
|
|
18192
18195
|
return this.timelines;
|
|
18193
18196
|
}
|
|
18194
|
-
initHandler() {
|
|
18195
|
-
this.setupTickHandler();
|
|
18197
|
+
initHandler(force = !1) {
|
|
18198
|
+
this.setupTickHandler(force);
|
|
18196
18199
|
}
|
|
18197
|
-
setupTickHandler() {
|
|
18200
|
+
setupTickHandler(force = !1) {
|
|
18201
|
+
if (!force && this.tickerHandler) return !0;
|
|
18198
18202
|
const handler = new RAFTickHandler();
|
|
18199
18203
|
return this.tickerHandler && this.tickerHandler.release(), this.tickerHandler = handler, !0;
|
|
18200
18204
|
}
|
|
@@ -18245,7 +18249,7 @@
|
|
|
18245
18249
|
return this.status = STATUS.RUNNING, this.tickerHandler.tick(0, this.handleTick), !0;
|
|
18246
18250
|
}
|
|
18247
18251
|
stop() {
|
|
18248
|
-
this.status = STATUS.INITIAL, this.setupTickHandler(), this.lastFrameTime = -1;
|
|
18252
|
+
this.status = STATUS.INITIAL, this.setupTickHandler(!0), this.lastFrameTime = -1;
|
|
18249
18253
|
}
|
|
18250
18254
|
trySyncTickStatus() {
|
|
18251
18255
|
this.status === STATUS.INITIAL && this.timelines.some(timeline => timeline.isRunning()) ? this.start() : this.status === STATUS.RUNNING && this.timelines.every(timeline => !timeline.isRunning()) && this.stop();
|
|
@@ -18506,10 +18510,11 @@
|
|
|
18506
18510
|
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
18507
18511
|
var _a, _b, _c, _d;
|
|
18508
18512
|
if (custom && customType) {
|
|
18509
|
-
const customParams =
|
|
18513
|
+
const customParams = Object.assign({
|
|
18510
18514
|
width: graphic.stage.width,
|
|
18511
|
-
height: graphic.stage.height
|
|
18512
|
-
|
|
18515
|
+
height: graphic.stage.height,
|
|
18516
|
+
group: this._target.parent
|
|
18517
|
+
}, this.resolveValue(customParameters, graphic)),
|
|
18513
18518
|
objOptions = isFunction$1(options) ? options.call(null, null !== (_b = customParams && (null === (_a = customParams.data) || void 0 === _a ? void 0 : _a[0])) && void 0 !== _b ? _b : null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, customParams) : options;
|
|
18514
18519
|
customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
|
|
18515
18520
|
} else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
|
|
@@ -18774,7 +18779,6 @@
|
|
|
18774
18779
|
}
|
|
18775
18780
|
animate(params) {
|
|
18776
18781
|
var _a, _b, _c;
|
|
18777
|
-
this.animates || (this.animates = new Map());
|
|
18778
18782
|
const animate = new Animate(null == params ? void 0 : params.id, null !== (_b = null !== (_a = null == params ? void 0 : params.timeline) && void 0 !== _a ? _a : this.stage && this.stage.getTimeline()) && void 0 !== _b ? _b : defaultTimeline, null == params ? void 0 : params.slience);
|
|
18779
18783
|
if (animate.bind(this), params) {
|
|
18780
18784
|
const {
|
|
@@ -18784,9 +18788,7 @@
|
|
|
18784
18788
|
} = params;
|
|
18785
18789
|
null != onStart && animate.onStart(onStart), null != onEnd && animate.onEnd(onEnd), null != onRemove && animate.onRemove(onRemove);
|
|
18786
18790
|
}
|
|
18787
|
-
return this.
|
|
18788
|
-
animate.stop(), this.animates.delete(animate.id);
|
|
18789
|
-
}), null === (_c = this.stage) || void 0 === _c || _c.ticker.start(), animate;
|
|
18791
|
+
return null === (_c = this.stage) || void 0 === _c || _c.ticker.start(), animate;
|
|
18790
18792
|
}
|
|
18791
18793
|
createTimeline() {
|
|
18792
18794
|
return new DefaultTimeline();
|
|
@@ -18825,7 +18827,7 @@
|
|
|
18825
18827
|
|
|
18826
18828
|
class ACustomAnimate extends Step {
|
|
18827
18829
|
constructor(customFrom, customTo, duration, easing, params) {
|
|
18828
|
-
super("customAnimate", customTo, duration, easing), this.type = "customAnimate", this.customFrom = customFrom, this.params = params;
|
|
18830
|
+
super("customAnimate", customTo, duration, easing), this.type = "customAnimate", this.customFrom = customFrom, this.params = params, this.from = customFrom, this.to = customTo;
|
|
18829
18831
|
}
|
|
18830
18832
|
update(end, ratio, out) {
|
|
18831
18833
|
if (this.onStart(), !this.props || !this.propKeys) return;
|