@visactor/vrender-components 1.1.0-alpha.22 → 1.1.0-alpha.24
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/animation/axis-animate.d.ts +1 -1
- package/cjs/animation/axis-animate.js +7 -7
- package/cjs/animation/axis-animate.js.map +1 -1
- package/cjs/animation/label-animate.d.ts +1 -1
- package/cjs/animation/label-animate.js +10 -20
- package/cjs/animation/label-animate.js.map +1 -1
- package/cjs/axis/animate/group-transition.d.ts +1 -1
- package/cjs/axis/animate/group-transition.js +2 -2
- package/cjs/axis/animate/group-transition.js.map +1 -1
- package/cjs/axis/register.js +8 -7
- package/cjs/axis/register.js.map +1 -1
- package/cjs/brush/register.js +2 -2
- package/cjs/brush/register.js.map +1 -1
- package/cjs/checkbox/register.js +3 -3
- package/cjs/checkbox/register.js.map +1 -1
- package/cjs/crosshair/register.js +7 -7
- package/cjs/crosshair/register.js.map +1 -1
- package/cjs/data-zoom/register.js +3 -3
- package/cjs/data-zoom/register.js.map +1 -1
- package/cjs/empty-tip/register.js +3 -2
- package/cjs/empty-tip/register.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/indicator/register.js +3 -2
- package/cjs/indicator/register.js.map +1 -1
- package/cjs/jsx/component-type.d.ts +2 -3
- package/cjs/jsx/component-type.js.map +1 -1
- package/cjs/label/base.d.ts +4 -1
- package/cjs/label/base.js +33 -34
- package/cjs/label/base.js.map +1 -1
- package/cjs/label/register.js +4 -3
- package/cjs/label/register.js.map +1 -1
- package/cjs/label-item/register.js +3 -3
- package/cjs/label-item/register.js.map +1 -1
- package/cjs/legend/register.js +3 -3
- package/cjs/legend/register.js.map +1 -1
- package/cjs/link-path/register.js +2 -2
- package/cjs/link-path/register.js.map +1 -1
- package/cjs/marker/animate/animate.d.ts +1 -1
- package/cjs/marker/animate/animate.js.map +1 -1
- package/cjs/marker/animate/call-in.d.ts +2 -2
- package/cjs/marker/animate/call-in.js +5 -4
- package/cjs/marker/animate/call-in.js.map +1 -1
- package/cjs/marker/animate/clip-in.js +5 -4
- package/cjs/marker/animate/clip-in.js.map +1 -1
- package/cjs/marker/animate/common.d.ts +1 -0
- package/cjs/marker/animate/common.js +13 -8
- package/cjs/marker/animate/common.js.map +1 -1
- package/cjs/marker/animate/fade-in.d.ts +1 -1
- package/cjs/marker/animate/fade-in.js.map +1 -1
- package/cjs/marker/animate/fade-out.d.ts +1 -1
- package/cjs/marker/animate/fade-out.js.map +1 -1
- package/cjs/marker/arc-area.d.ts +1 -1
- package/cjs/marker/area.d.ts +1 -1
- package/cjs/marker/common-line.d.ts +1 -1
- package/cjs/marker/point.d.ts +1 -1
- package/cjs/marker/register.js +8 -8
- package/cjs/marker/register.js.map +1 -1
- package/cjs/marker/type.d.ts +6 -4
- package/cjs/marker/type.js.map +1 -1
- package/cjs/pager/register.js +3 -2
- package/cjs/pager/register.js.map +1 -1
- package/cjs/player/register.js +3 -3
- package/cjs/player/register.js.map +1 -1
- package/cjs/poptip/register.js +3 -3
- package/cjs/poptip/register.js.map +1 -1
- package/cjs/radio/register.js +3 -3
- package/cjs/radio/register.js.map +1 -1
- package/cjs/scrollbar/register.js +2 -2
- package/cjs/scrollbar/register.js.map +1 -1
- package/cjs/segment/register.js +5 -5
- package/cjs/segment/register.js.map +1 -1
- package/cjs/slider/register.js +3 -3
- package/cjs/slider/register.js.map +1 -1
- package/cjs/switch/register.js +3 -3
- package/cjs/switch/register.js.map +1 -1
- package/cjs/table-series-number/register.js +3 -2
- package/cjs/table-series-number/register.js.map +1 -1
- package/cjs/tag/register.js +4 -3
- package/cjs/tag/register.js.map +1 -1
- package/cjs/timeline/register.js +3 -3
- package/cjs/timeline/register.js.map +1 -1
- package/cjs/title/register.js +3 -2
- package/cjs/title/register.js.map +1 -1
- package/cjs/tooltip/register.js +3 -3
- package/cjs/tooltip/register.js.map +1 -1
- package/cjs/weather/register.js +2 -2
- package/cjs/weather/register.js.map +1 -1
- package/cjs/weather/weather-box.js +5 -5
- package/cjs/weather/weather-box.js.map +1 -1
- package/dist/index.es.js +4004 -3972
- package/es/animation/axis-animate.d.ts +1 -1
- package/es/animation/axis-animate.js +5 -1
- package/es/animation/axis-animate.js.map +1 -1
- package/es/animation/label-animate.d.ts +1 -1
- package/es/animation/label-animate.js +8 -12
- package/es/animation/label-animate.js.map +1 -1
- package/es/axis/animate/group-transition.d.ts +1 -1
- package/es/axis/animate/group-transition.js +1 -1
- package/es/axis/animate/group-transition.js.map +1 -1
- package/es/axis/register.js +13 -1
- package/es/axis/register.js.map +1 -1
- package/es/brush/register.js +3 -1
- package/es/brush/register.js.map +1 -1
- package/es/checkbox/register.js +7 -1
- package/es/checkbox/register.js.map +1 -1
- package/es/crosshair/register.js +9 -1
- package/es/crosshair/register.js.map +1 -1
- package/es/data-zoom/register.js +7 -1
- package/es/data-zoom/register.js.map +1 -1
- package/es/empty-tip/register.js +5 -1
- package/es/empty-tip/register.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/indicator/register.js +5 -1
- package/es/indicator/register.js.map +1 -1
- package/es/jsx/component-type.d.ts +2 -3
- package/es/jsx/component-type.js.map +1 -1
- package/es/label/base.d.ts +4 -1
- package/es/label/base.js +33 -34
- package/es/label/base.js.map +1 -1
- package/es/label/register.js +7 -1
- package/es/label/register.js.map +1 -1
- package/es/label-item/register.js +7 -1
- package/es/label-item/register.js.map +1 -1
- package/es/legend/register.js +3 -1
- package/es/legend/register.js.map +1 -1
- package/es/link-path/register.js +3 -1
- package/es/link-path/register.js.map +1 -1
- package/es/marker/animate/animate.d.ts +1 -1
- package/es/marker/animate/animate.js.map +1 -1
- package/es/marker/animate/call-in.d.ts +2 -2
- package/es/marker/animate/call-in.js +6 -4
- package/es/marker/animate/call-in.js.map +1 -1
- package/es/marker/animate/clip-in.js +6 -4
- package/es/marker/animate/clip-in.js.map +1 -1
- package/es/marker/animate/common.d.ts +1 -0
- package/es/marker/animate/common.js +9 -4
- package/es/marker/animate/common.js.map +1 -1
- package/es/marker/animate/fade-in.d.ts +1 -1
- package/es/marker/animate/fade-in.js.map +1 -1
- package/es/marker/animate/fade-out.d.ts +1 -1
- package/es/marker/animate/fade-out.js.map +1 -1
- package/es/marker/arc-area.d.ts +1 -1
- package/es/marker/area.d.ts +1 -1
- package/es/marker/common-line.d.ts +1 -1
- package/es/marker/point.d.ts +1 -1
- package/es/marker/register.js +12 -2
- package/es/marker/register.js.map +1 -1
- package/es/marker/type.d.ts +6 -4
- package/es/marker/type.js.map +1 -1
- package/es/pager/register.js +5 -1
- package/es/pager/register.js.map +1 -1
- package/es/player/register.js +3 -1
- package/es/player/register.js.map +1 -1
- package/es/poptip/register.js +7 -1
- package/es/poptip/register.js.map +1 -1
- package/es/radio/register.js +7 -1
- package/es/radio/register.js.map +1 -1
- package/es/scrollbar/register.js +3 -1
- package/es/scrollbar/register.js.map +1 -1
- package/es/segment/register.js +9 -1
- package/es/segment/register.js.map +1 -1
- package/es/slider/register.js +7 -1
- package/es/slider/register.js.map +1 -1
- package/es/switch/register.js +7 -1
- package/es/switch/register.js.map +1 -1
- package/es/table-series-number/register.js +5 -1
- package/es/table-series-number/register.js.map +1 -1
- package/es/tag/register.js +9 -1
- package/es/tag/register.js.map +1 -1
- package/es/timeline/register.js +7 -1
- package/es/timeline/register.js.map +1 -1
- package/es/title/register.js +5 -1
- package/es/title/register.js.map +1 -1
- package/es/tooltip/register.js +9 -1
- package/es/tooltip/register.js.map +1 -1
- package/es/weather/register.js +3 -1
- package/es/weather/register.js.map +1 -1
- package/es/weather/weather-box.js +3 -1
- package/es/weather/weather-box.js.map +1 -1
- package/package.json +220 -6
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.registerAxisAnimate = exports.AxisUpdate = exports.AxisEnter = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const component_1 = require("@visactor/vrender-animate/component"), custom_animate_1 = require("@visactor/vrender-animate/custom/custom-animate"), animate_executor_1 = require("@visactor/vrender-animate/executor/animate-executor"), static_truth_1 = require("./static-truth");
|
|
8
8
|
|
|
9
|
-
class AxisEnter extends
|
|
9
|
+
class AxisEnter extends custom_animate_1.AComponentAnimate {
|
|
10
10
|
onBind() {
|
|
11
11
|
var _a;
|
|
12
|
-
const animator = (0,
|
|
12
|
+
const animator = (0, component_1.createComponentAnimator)(this.target);
|
|
13
13
|
this._animator = animator;
|
|
14
14
|
const duration = this.duration, easing = this.easing, {config: config, lastScale: lastScale, getTickCoord: getTickCoord} = this.params;
|
|
15
15
|
let ratio = 1;
|
|
@@ -44,9 +44,9 @@ class AxisEnter extends vrender_animate_1.AComponentAnimate {
|
|
|
44
44
|
|
|
45
45
|
exports.AxisEnter = AxisEnter;
|
|
46
46
|
|
|
47
|
-
class AxisUpdate extends
|
|
47
|
+
class AxisUpdate extends custom_animate_1.AComponentAnimate {
|
|
48
48
|
onBind() {
|
|
49
|
-
const animator = (0,
|
|
49
|
+
const animator = (0, component_1.createComponentAnimator)(this.target);
|
|
50
50
|
this._animator = animator;
|
|
51
51
|
const duration = this.duration, easing = this.easing, {diffAttrs: diffAttrs} = this.params;
|
|
52
52
|
(0, static_truth_1.commitUpdateAnimationTarget)(this.target, Object.assign({}, diffAttrs)),
|
|
@@ -70,8 +70,8 @@ class AxisUpdate extends vrender_animate_1.AComponentAnimate {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
function registerAxisAnimate() {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("axisEnter", AxisEnter),
|
|
74
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("axisUpdate", AxisUpdate);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
exports.AxisUpdate = AxisUpdate, exports.registerAxisAnimate = registerAxisAnimate;
|
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C,CAAC,CAAC;IAC9B,CAAC;IAED,eAAe,CAAC,IAAc;QAC5B,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAGS,kBAAkB;QAC1B,OAAO;IACT,CAAC;CACF;AApDD,gCAoDC;AAED,SAAgB,mBAAmB;IAEjC,kCAAe,CAAC,sBAAsB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC/D,kCAAe,CAAC,sBAAsB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AACnE,CAAC;AAJD,kDAIC","file":"axis-animate.js","sourcesContent":["import { createComponentAnimator } from '@visactor/vrender-animate/component';\nimport { AComponentAnimate } from '@visactor/vrender-animate/custom/custom-animate';\nimport { AnimateExecutor } from '@visactor/vrender-animate/executor/animate-executor';\nimport { commitUpdateAnimationTarget } from './static-truth';\n\n/**\n * AxisEnter class handles the enter animation for Axis components\n */\nexport class AxisEnter extends AComponentAnimate<any> {\n onBind(): void {\n const animator = createComponentAnimator(this.target);\n this._animator = animator;\n const duration = this.duration;\n const easing = this.easing;\n const { config, lastScale, getTickCoord } = this.params;\n\n let ratio = 1;\n const currData = this.target.data;\n if (lastScale && getTickCoord && currData) {\n ratio = 0.7;\n\n const oldValue = lastScale.scale(currData.rawValue);\n const point = getTickCoord(oldValue);\n const newX = this.target.attribute.x;\n const newY = this.target.attribute.y;\n\n commitUpdateAnimationTarget(this.target, { x: newX, y: newY }, { x: point.x, y: point.y });\n animator.animate(this.target, {\n type: 'to',\n to: { x: newX, y: newY },\n duration,\n easing\n });\n }\n\n // if (updateEls && updateEls.length > 1) {\n // ratio = 0.5;\n // const oldData1 = updateEls[0].oldEl.data;\n // const { rawValue: oldRawValue1, value: oldValue1 } = oldData1;\n // const oldData2 = updateEls[1].oldEl.data;\n // const { rawValue: oldRawValue2, value: oldValue2 } = oldData2;\n // const data = this.target.data;\n // const { rawValue: newRawValue } = data;\n // // rawValue 是原始值,value是映射出来的值,假设是线性映射,计算一下newRawValue在old阶段的value是什么值\n // const oldValue =\n // oldValue1 + ((oldValue2 - oldValue1) * (newRawValue - oldRawValue1)) / (oldRawValue2 - oldRawValue1);\n // // 将 x 和 y 做映射\n // const oldX1 = updateEls[0].oldEl.attribute.x;\n // const oldY1 = updateEls[0].oldEl.attribute.y;\n // const oldX2 = updateEls[1].oldEl.attribute.x;\n // const oldY2 = updateEls[1].oldEl.attribute.y;\n // const oldX = oldX1 + ((oldX2 - oldX1) * (oldValue - oldValue1)) / (oldValue2 - oldValue1);\n // const oldY = oldY1 + ((oldY2 - oldY1) * (oldValue - oldValue1)) / (oldValue2 - oldValue1);\n // const newX = this.target.attribute.x;\n // const newY = this.target.attribute.y;\n\n // this.target.setAttributes({ x: oldX, y: oldY });\n // animator.animate(this.target, {\n // type: 'to',\n // to: { x: newX, y: newY },\n // duration,\n // easing\n // });\n // }\n\n animator.animate(this.target, {\n type: config.type ?? 'fadeIn',\n to: config.to,\n duration: duration * ratio,\n easing\n });\n this.completeBind(animator);\n }\n}\n\n/**\n * AxisUpdate class handles the update animation for Axis components\n */\nexport class AxisUpdate extends AComponentAnimate<any> {\n onBind(): void {\n const animator = createComponentAnimator(this.target);\n this._animator = animator;\n const duration = this.duration;\n const easing = this.easing;\n const { diffAttrs } = this.params;\n // this.target.applyAnimationState(\n // ['update'],\n // [\n // {\n // name: 'update',\n // animation: {\n // type: 'to',\n // to: { ...this.props },\n // duration,\n // easing,\n // customParameters: {\n // diffAttrs: { ...this.props }\n // }\n // }\n // }\n // ]\n // );\n // console.log('this.props', this.props, { ...this.target.attribute });\n commitUpdateAnimationTarget(this.target, { ...diffAttrs });\n animator.animate(this.target, {\n type: 'to',\n to: { ...diffAttrs },\n duration,\n easing,\n customParameters: {\n diffAttrs: { ...diffAttrs }\n }\n });\n this.completeBind(animator);\n }\n\n // 轴动画本身没有逻辑,具体通过animator中执行,所以当需要屏蔽自身属性时,需要通过animator中执行\n deleteSelfAttr(key: string): void {\n this.deleteSelfAttrs([key]);\n }\n\n deleteSelfAttrs(keys: string[]): void {\n super.deleteSelfAttrs(keys);\n this._animator.deleteSelfAttrs(keys);\n }\n\n // 轴动画本身没有逻辑,具体通过animator中执行,所以本身不需要屏蔽冲突\n protected tryPreventConflict(): void {\n return;\n }\n}\n\nexport function registerAxisAnimate() {\n // Label update animation\n AnimateExecutor.registerBuiltInAnimate('axisEnter', AxisEnter);\n AnimateExecutor.registerBuiltInAnimate('axisUpdate', AxisUpdate);\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AComponentAnimate } from '@visactor/vrender-animate';
|
|
1
|
+
import { AComponentAnimate } from '@visactor/vrender-animate/custom/custom-animate';
|
|
2
2
|
export declare class LabelUpdate extends AComponentAnimate<any> {
|
|
3
3
|
onBind(): void;
|
|
4
4
|
protected tryPreventConflict(): void;
|
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var __rest = this && this.__rest || function(s, e) {
|
|
4
|
-
var t = {};
|
|
5
|
-
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
6
|
-
if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
|
|
7
|
-
var i = 0;
|
|
8
|
-
for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
3
|
Object.defineProperty(exports, "__esModule", {
|
|
14
4
|
value: !0
|
|
15
5
|
}), exports.registerLabelAnimate = exports.LabelEnter = exports.LabelUpdate = void 0;
|
|
16
6
|
|
|
17
|
-
const
|
|
7
|
+
const component_1 = require("@visactor/vrender-animate/component"), custom_animate_1 = require("@visactor/vrender-animate/custom/custom-animate"), number_1 = require("@visactor/vrender-animate/custom/number"), animate_executor_1 = require("@visactor/vrender-animate/executor/animate-executor");
|
|
18
8
|
|
|
19
|
-
class LabelUpdate extends
|
|
9
|
+
class LabelUpdate extends custom_animate_1.AComponentAnimate {
|
|
20
10
|
onBind() {
|
|
21
|
-
const animator = (0,
|
|
11
|
+
const animator = (0, component_1.createComponentAnimator)(this.target);
|
|
22
12
|
this._animator = animator;
|
|
23
13
|
const duration = this.duration, easing = this.easing, {prevText: prevText, curText: curText, prevLabelLine: prevLabelLine, curLabelLine: curLabelLine, increaseEffect: increaseEffect = !0} = this.params, diff = {};
|
|
24
14
|
for (const key in curText.attribute) prevText.attribute[key] !== curText.attribute[key] && (diff[key] = curText.attribute[key]);
|
|
25
|
-
const
|
|
26
|
-
animator.animate(prevText, {
|
|
15
|
+
const rest = Object.assign({}, diff);
|
|
16
|
+
delete rest.text, animator.animate(prevText, {
|
|
27
17
|
type: "to",
|
|
28
18
|
to: rest,
|
|
29
19
|
duration: duration,
|
|
@@ -47,9 +37,9 @@ class LabelUpdate extends vrender_animate_1.AComponentAnimate {
|
|
|
47
37
|
|
|
48
38
|
exports.LabelUpdate = LabelUpdate;
|
|
49
39
|
|
|
50
|
-
class LabelEnter extends
|
|
40
|
+
class LabelEnter extends custom_animate_1.AComponentAnimate {
|
|
51
41
|
onBind() {
|
|
52
|
-
const animator = (0,
|
|
42
|
+
const animator = (0, component_1.createComponentAnimator)(this.target);
|
|
53
43
|
this._animator = animator;
|
|
54
44
|
const duration = this.duration, easing = this.easing, {relatedGraphic: relatedGraphic, relatedGraphics: relatedGraphics, config: config} = this.params, {mode: mode, type: type = "fadeIn"} = config, target = this.target;
|
|
55
45
|
let startTime = 0;
|
|
@@ -72,9 +62,9 @@ class LabelEnter extends vrender_animate_1.AComponentAnimate {
|
|
|
72
62
|
}
|
|
73
63
|
|
|
74
64
|
function registerLabelAnimate() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("increaseCount", number_1.IncreaseCount),
|
|
66
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("labelUpdate", LabelUpdate),
|
|
67
|
+
animate_executor_1.AnimateExecutor.registerBuiltInAnimate("labelEnter", LabelEnter);
|
|
78
68
|
}
|
|
79
69
|
|
|
80
70
|
exports.LabelEnter = LabelEnter, exports.registerLabelAnimate = registerLabelAnimate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/animation/label-animate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/animation/label-animate.ts"],"names":[],"mappings":";;;AAAA,mEAA8E;AAC9E,oFAAoF;AACpF,oEAAwE;AACxE,0FAAsF;AAKtF,MAAa,WAAY,SAAQ,kCAAsB;IACrD,MAAM;QACJ,MAAM,QAAQ,GAAG,IAAA,mCAAuB,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAE3B,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QAC9F,MAAM,IAAI,GAAwB,EAAE,CAAC;QAErC,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,SAAS,EAAE;YACnC,IAAI,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;gBACtD,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;aACpC;SACF;QAED,MAAM,IAAI,qBAAQ,IAAI,CAAE,CAAC;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC;QAEjB,QAAQ,CAAC,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,CAAC,CAAC;AACnE,CAAC;AALD,oDAKC","file":"label-animate.js","sourcesContent":["import { createComponentAnimator } from '@visactor/vrender-animate/component';\nimport { AComponentAnimate } from '@visactor/vrender-animate/custom/custom-animate';\nimport { IncreaseCount } from '@visactor/vrender-animate/custom/number';\nimport { AnimateExecutor } from '@visactor/vrender-animate/executor/animate-executor';\n\n/**\n * LabelUpdate class handles the update animation for Label components\n */\nexport class LabelUpdate extends AComponentAnimate<any> {\n onBind(): void {\n const animator = createComponentAnimator(this.target);\n this._animator = animator;\n const duration = this.duration;\n const easing = this.easing;\n\n const { prevText, curText, prevLabelLine, curLabelLine, increaseEffect = true } = this.params;\n const diff: Record<string, any> = {};\n\n for (const key in curText.attribute) {\n if (prevText.attribute[key] !== curText.attribute[key]) {\n diff[key] = curText.attribute[key];\n }\n }\n\n const rest = { ...diff };\n delete rest.text;\n\n animator.animate(prevText, {\n type: 'to',\n to: rest,\n duration,\n easing\n });\n\n if (increaseEffect !== false) {\n animator.animate(prevText, {\n type: 'increaseCount',\n to: {\n text: curText.attribute.text\n },\n duration,\n easing\n });\n }\n\n if (prevLabelLine) {\n animator.animate(prevLabelLine, {\n type: 'to',\n to: curLabelLine.attribute,\n duration,\n easing\n });\n }\n\n this.completeBind(animator);\n }\n\n // 标签动画本身没有逻辑,具体通过animator中执行,所以本身不需要屏蔽冲突\n protected tryPreventConflict(): void {\n return;\n }\n}\n\nexport class LabelEnter extends AComponentAnimate<any> {\n onBind(): void {\n const animator = createComponentAnimator(this.target);\n this._animator = animator;\n const duration = this.duration;\n const easing = this.easing;\n\n const { relatedGraphic, relatedGraphics, config } = this.params;\n const { mode, type = 'fadeIn' } = config;\n\n const target = this.target;\n\n let startTime = 0;\n\n if (mode === 'after') {\n relatedGraphic.animates &&\n relatedGraphic.animates.forEach((animate: any) => {\n startTime = Math.max(startTime, animate.getStartTime() + animate.getTotalDuration());\n });\n } else if (mode === 'after-all') {\n relatedGraphics &&\n relatedGraphics.forEach((graphic: any) => {\n graphic.animates &&\n graphic.animates.forEach((animate: any) => {\n startTime = Math.max(startTime, animate.getStartTime() + animate.getTotalDuration());\n });\n });\n } else {\n // 'same-time'\n relatedGraphic.animates &&\n relatedGraphic.animates.forEach((animate: any) => {\n startTime = Math.max(startTime, animate.getStartTime());\n });\n }\n\n animator.animate(target, {\n ...config,\n duration,\n easing,\n startTime,\n type\n });\n\n this.completeBind(animator);\n }\n\n // 标签动画本身没有逻辑,具体通过animator中执行,所以本身不需要屏蔽冲突\n protected tryPreventConflict(): void {\n return;\n }\n}\n\nexport function registerLabelAnimate() {\n AnimateExecutor.registerBuiltInAnimate('increaseCount', IncreaseCount);\n // Label update animation\n AnimateExecutor.registerBuiltInAnimate('labelUpdate', LabelUpdate);\n AnimateExecutor.registerBuiltInAnimate('labelEnter', LabelEnter);\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnimateMode, type IGroup } from '@visactor/vrender-core';
|
|
2
|
-
import { ACustomAnimate } from '@visactor/vrender-animate';
|
|
2
|
+
import { ACustomAnimate } from '@visactor/vrender-animate/custom/custom-animate';
|
|
3
3
|
export declare class GroupTransition extends ACustomAnimate<any> {
|
|
4
4
|
target: IGroup;
|
|
5
5
|
private _newElementAttrMap;
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.GroupTransition = void 0;
|
|
6
6
|
|
|
7
|
-
const vrender_core_1 = require("@visactor/vrender-core"),
|
|
7
|
+
const vrender_core_1 = require("@visactor/vrender-core"), custom_animate_1 = require("@visactor/vrender-animate/custom/custom-animate"), vutils_1 = require("@visactor/vutils"), util_1 = require("../../util"), static_truth_1 = require("../../animation/static-truth");
|
|
8
8
|
|
|
9
|
-
class GroupTransition extends
|
|
9
|
+
class GroupTransition extends custom_animate_1.ACustomAnimate {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments), this.mode = vrender_core_1.AnimateMode.NORMAL;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/axis/animate/group-transition.ts"],"names":[],"mappings":";;;AAAA,yDAAkG;AAClG
|
|
1
|
+
{"version":3,"sources":["../src/axis/animate/group-transition.ts"],"names":[],"mappings":";;;AAAA,yDAAkG;AAClG,oFAAiF;AACjF,6CAAmG;AACnG,qCAA2C;AAC3C,+DAA2E;AAE3E,MAAa,eAAgB,SAAQ,+BAAmB;IAAxD;;QAKE,SAAI,GAAG,0BAAW,CAAC,MAAM,CAAC;IA0G5B,CAAC;IAxGC,MAAM;QACJ,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QAEtB,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;QAEpD,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;QACrD,IAAI,CAAC,aAAa,EAAE;YAClB,OAAO;SACR;QAED,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAI7B,IAAA,oBAAa,EAAC,gBAAgB,EAAE,CAAC,EAAY,EAAE,EAAE;;YAC/C,IAAK,EAAe,CAAC,IAAI,KAAK,OAAO,IAAI,EAAE,CAAC,EAAE,EAAE;gBAC9C,MAAM,KAAK,GAAG,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACnC,IAAI,KAAK,EAAE;oBACT,IAAI,CAAC,IAAA,gBAAO,EAAE,EAAe,CAAC,SAAS,EAAG,KAAkB,CAAC,SAAS,CAAC,EAAE;wBAEvE,MAAM,QAAQ,GAAG,IAAA,kBAAS,EAAE,EAAe,CAAC,SAAS,CAAC,CAAC;wBACvD,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG;4BAC/B,KAAK,EAAE,QAAQ;4BACf,IAAI,EAAE,EAAE;4BACR,KAAK,kCACA,QAAQ,KACX,OAAO,EAAE,MAAA,QAAQ,CAAC,OAAO,mCAAI,CA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core';\nimport { ACustomAnimate } from '@visactor/vrender-animate/custom/custom-animate';\nimport { cloneDeep, interpolateString, isEqual, isValidNumber, type Dict } from '@visactor/vutils';\nimport { traverseGroup } from '../../util';\nimport { commitUpdateAnimationTarget } from '../../animation/static-truth';\n\nexport class GroupTransition extends ACustomAnimate<any> {\n declare target: IGroup;\n\n private _newElementAttrMap: Dict<any>;\n private _started: boolean;\n mode = AnimateMode.NORMAL; // 组件的群组动画不需要设置走 AnimateMode.SET_ATTR_IMMEDIATELY\n\n onBind(): void {\n this._started = false;\n // @ts-ignore\n const currentInnerView = this.target.getInnerView();\n // @ts-ignore\n const prevInnerView = this.target.getPrevInnerView();\n if (!prevInnerView) {\n return;\n }\n\n this._newElementAttrMap = {};\n\n // 遍历新的场景树,将新节点属性更新为旧节点\n // TODO: 目前只处理更新场景\n traverseGroup(currentInnerView, (el: IGraphic) => {\n if ((el as IGraphic).type !== 'group' && el.id) {\n const oldEl = prevInnerView[el.id];\n if (oldEl) {\n if (!isEqual((el as IGraphic).attribute, (oldEl as IGraphic).attribute)) {\n // 更新\n const newProps = cloneDeep((el as IGraphic).attribute);\n this._newElementAttrMap[el.id] = {\n state: 'update',\n node: el,\n attrs: {\n ...newProps,\n opacity: newProps.opacity ?? 1,\n fillOpacity: newProps.fillOpacity ?? 1,\n strokeOpacity: newProps.strokeOpacity ?? 1\n }\n };\n\n commitUpdateAnimationTarget(\n el as IGraphic,\n this._newElementAttrMap[el.id].attrs,\n cloneDeep((oldEl as IGraphic).attribute)\n );\n }\n } else {\n // 新入场元素,进行 fadeIn 动画\n const finalOpacityAttrs = {\n opacity: el.attribute.opacity ?? 1,\n fillOpacity: el.attribute.fillOpacity ?? 1,\n strokeOpacity: el.attribute.strokeOpacity ?? 1\n };\n this._newElementAttrMap[el.id] = {\n state: 'enter',\n node: el,\n attrs: finalOpacityAttrs\n };\n commitUpdateAnimationTarget(el as IGraphic, finalOpacityAttrs, {\n opacity: 0,\n fillOpacity: 0,\n strokeOpacity: 0\n });\n }\n }\n });\n }\n\n onStart(): void {\n if (this._started) {\n return;\n }\n this._started = true;\n\n let duration = this.duration;\n let easing = this.easing;\n\n // 新的场景树\n this._newElementAttrMap &&\n Object.keys(this._newElementAttrMap).forEach(id => {\n const { node, attrs, state } = this._newElementAttrMap[id];\n if (state === 'enter') {\n const { enter = {} } = this.params ?? {};\n duration = isValidNumber(enter.duration) ? enter.duration : duration;\n easing = enter.easing ? enter.easing : easing;\n }\n if ((node as IGraphic).type === 'path') {\n (node as IGraphic)\n .animate({\n interpolate(key: string, ratio: number, from: any, to: any, nextAttributes: any) {\n if (key === 'path') {\n nextAttributes.path = interpolateString(from, to)(ratio);\n return true;\n }\n\n return false;\n }\n })\n // .wait(delay)\n .to(attrs, duration, easing as EasingType);\n } else {\n (node as IGraphic)\n .animate()\n // .wait(delay)\n .to(attrs, duration, easing as EasingType);\n }\n });\n }\n\n onUpdate(end: boolean, ratio: number, out: Record<string, any>): void {\n // do nothing\n }\n}\n"]}
|
package/cjs/axis/register.js
CHANGED
|
@@ -4,27 +4,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.loadCircleAxisGridComponent = exports.loadLineAxisGridComponent = exports.loadCircleAxisComponent = exports.loadLineAxisComponent = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const register_circle_1 = require("@visactor/vrender-kits/register/register-circle"), register_group_1 = require("@visactor/vrender-kits/register/register-group"), register_line_1 = require("@visactor/vrender-kits/register/register-line"), register_path_1 = require("@visactor/vrender-kits/register/register-path"), register_rect_1 = require("@visactor/vrender-kits/register/register-rect"), register_richtext_1 = require("@visactor/vrender-kits/register/register-richtext"), register_text_1 = require("@visactor/vrender-kits/register/register-text"), axis_animate_1 = require("../animation/axis-animate");
|
|
8
8
|
|
|
9
9
|
function loadBasicAxis() {
|
|
10
|
-
(0,
|
|
11
|
-
(0,
|
|
10
|
+
(0, register_group_1.registerGroup)(), (0, register_line_1.registerLine)(), (0,
|
|
11
|
+
register_richtext_1.registerRichtext)(), (0, register_text_1.registerText)(), (0,
|
|
12
|
+
axis_animate_1.registerAxisAnimate)();
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
function loadLineAxisComponent() {
|
|
15
|
-
loadBasicAxis(), (0,
|
|
16
|
+
loadBasicAxis(), (0, register_rect_1.registerRect)();
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
function loadCircleAxisComponent() {
|
|
19
|
-
loadBasicAxis(), (0,
|
|
20
|
+
loadBasicAxis(), (0, register_circle_1.registerCircle)();
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
function loadLineAxisGridComponent() {
|
|
23
|
-
(0,
|
|
24
|
+
(0, register_group_1.registerGroup)(), (0, register_path_1.registerPath)();
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
function loadCircleAxisGridComponent() {
|
|
27
|
-
(0,
|
|
28
|
+
(0, register_group_1.registerGroup)(), (0, register_path_1.registerPath)();
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
exports.loadLineAxisComponent = loadLineAxisComponent, exports.loadCircleAxisComponent = loadCircleAxisComponent,
|
package/cjs/axis/register.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/axis/register.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/axis/register.ts"],"names":[],"mappings":";;;AAAA,qFAAiF;AACjF,mFAA+E;AAC/E,iFAA6E;AAC7E,iFAA6E;AAC7E,iFAA6E;AAC7E,yFAAqF;AACrF,iFAA6E;AAC7E,4DAAgE;AAEhE,SAAS,aAAa;IACpB,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;IACf,IAAA,oCAAgB,GAAE,CAAC;IACnB,IAAA,4BAAY,GAAE,CAAC;IACf,IAAA,kCAAmB,GAAE,CAAC;AACxB,CAAC;AAED,SAAgB,qBAAqB;IACnC,aAAa,EAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;AACjB,CAAC;AAHD,sDAGC;AAED,SAAgB,uBAAuB;IACrC,aAAa,EAAE,CAAC;IAChB,IAAA,gCAAc,GAAE,CAAC;AACnB,CAAC;AAHD,0DAGC;AAED,SAAgB,yBAAyB;IACvC,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;AACjB,CAAC;AAHD,8DAGC;AAED,SAAgB,2BAA2B;IACzC,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;AACjB,CAAC;AAHD,kEAGC","file":"register.js","sourcesContent":["import { registerCircle } from '@visactor/vrender-kits/register/register-circle';\nimport { registerGroup } from '@visactor/vrender-kits/register/register-group';\nimport { registerLine } from '@visactor/vrender-kits/register/register-line';\nimport { registerPath } from '@visactor/vrender-kits/register/register-path';\nimport { registerRect } from '@visactor/vrender-kits/register/register-rect';\nimport { registerRichtext } from '@visactor/vrender-kits/register/register-richtext';\nimport { registerText } from '@visactor/vrender-kits/register/register-text';\nimport { registerAxisAnimate } from '../animation/axis-animate';\n\nfunction loadBasicAxis() {\n registerGroup();\n registerLine();\n registerRichtext();\n registerText();\n registerAxisAnimate();\n}\n\nexport function loadLineAxisComponent() {\n loadBasicAxis();\n registerRect();\n}\n\nexport function loadCircleAxisComponent() {\n loadBasicAxis();\n registerCircle();\n}\n\nexport function loadLineAxisGridComponent() {\n registerGroup();\n registerPath();\n}\n\nexport function loadCircleAxisGridComponent() {\n registerGroup();\n registerPath();\n}\n"]}
|
package/cjs/brush/register.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.loadBrushComponent = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const register_group_1 = require("@visactor/vrender-kits/register/register-group"), register_polygon_1 = require("@visactor/vrender-kits/register/register-polygon");
|
|
8
8
|
|
|
9
9
|
function loadBrushComponent() {
|
|
10
|
-
(0,
|
|
10
|
+
(0, register_group_1.registerGroup)(), (0, register_polygon_1.registerPolygon)();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
exports.loadBrushComponent = loadBrushComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/brush/register.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/brush/register.ts"],"names":[],"mappings":";;;AAAA,mFAA+E;AAC/E,uFAAmF;AAEnF,SAAgB,kBAAkB;IAChC,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,kCAAe,GAAE,CAAC;AACpB,CAAC;AAHD,gDAGC","file":"register.js","sourcesContent":["import { registerGroup } from '@visactor/vrender-kits/register/register-group';\nimport { registerPolygon } from '@visactor/vrender-kits/register/register-polygon';\n\nexport function loadBrushComponent() {\n registerGroup();\n registerPolygon();\n}\n"]}
|
package/cjs/checkbox/register.js
CHANGED
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.loadCheckBoxComponent = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const register_group_1 = require("@visactor/vrender-kits/register/register-group"), register_image_1 = require("@visactor/vrender-kits/register/register-image"), register_rect_1 = require("@visactor/vrender-kits/register/register-rect"), register_text_1 = require("@visactor/vrender-kits/register/register-text");
|
|
8
8
|
|
|
9
9
|
function loadCheckBoxComponent() {
|
|
10
|
-
(0,
|
|
11
|
-
(0,
|
|
10
|
+
(0, register_group_1.registerGroup)(), (0, register_rect_1.registerRect)(), (0,
|
|
11
|
+
register_text_1.registerText)(), (0, register_image_1.registerImage)();
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
exports.loadCheckBoxComponent = loadCheckBoxComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/checkbox/register.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/checkbox/register.ts"],"names":[],"mappings":";;;AAAA,mFAA+E;AAC/E,mFAA+E;AAC/E,iFAA6E;AAC7E,iFAA6E;AAE7E,SAAgB,qBAAqB;IACnC,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;IACf,IAAA,4BAAY,GAAE,CAAC;IACf,IAAA,8BAAa,GAAE,CAAC;AAClB,CAAC;AALD,sDAKC","file":"register.js","sourcesContent":["import { registerGroup } from '@visactor/vrender-kits/register/register-group';\nimport { registerImage } from '@visactor/vrender-kits/register/register-image';\nimport { registerRect } from '@visactor/vrender-kits/register/register-rect';\nimport { registerText } from '@visactor/vrender-kits/register/register-text';\n\nexport function loadCheckBoxComponent() {\n registerGroup();\n registerRect();\n registerText();\n registerImage();\n}\n"]}
|
|
@@ -4,30 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.loadPolygonSectorCrosshairComponent = exports.loadSectorCrosshairComponent = exports.loadRectCrosshairComponent = exports.loadPolygonCrosshairComponent = exports.loadCircleCrosshairComponent = exports.loadLineCrosshairComponent = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const register_arc_1 = require("@visactor/vrender-kits/register/register-arc"), register_group_1 = require("@visactor/vrender-kits/register/register-group"), register_line_1 = require("@visactor/vrender-kits/register/register-line"), register_path_1 = require("@visactor/vrender-kits/register/register-path"), register_rect_1 = require("@visactor/vrender-kits/register/register-rect");
|
|
8
8
|
|
|
9
9
|
function loadLineCrosshairComponent() {
|
|
10
|
-
(0,
|
|
10
|
+
(0, register_group_1.registerGroup)(), (0, register_line_1.registerLine)();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
function loadCircleCrosshairComponent() {
|
|
14
|
-
(0,
|
|
14
|
+
(0, register_group_1.registerGroup)(), (0, register_arc_1.registerArc)();
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function loadPolygonCrosshairComponent() {
|
|
18
|
-
(0,
|
|
18
|
+
(0, register_group_1.registerGroup)(), (0, register_path_1.registerPath)();
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function loadRectCrosshairComponent() {
|
|
22
|
-
(0,
|
|
22
|
+
(0, register_group_1.registerGroup)(), (0, register_rect_1.registerRect)();
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
function loadSectorCrosshairComponent() {
|
|
26
|
-
(0,
|
|
26
|
+
(0, register_group_1.registerGroup)(), (0, register_arc_1.registerArc)();
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function loadPolygonSectorCrosshairComponent() {
|
|
30
|
-
(0,
|
|
30
|
+
(0, register_group_1.registerGroup)(), (0, register_path_1.registerPath)();
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
exports.loadLineCrosshairComponent = loadLineCrosshairComponent, exports.loadCircleCrosshairComponent = loadCircleCrosshairComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/crosshair/register.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/crosshair/register.ts"],"names":[],"mappings":";;;AAAA,+EAA2E;AAC3E,mFAA+E;AAC/E,iFAA6E;AAC7E,iFAA6E;AAC7E,iFAA6E;AAE7E,SAAgB,0BAA0B;IACxC,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;AACjB,CAAC;AAHD,gEAGC;AAED,SAAgB,4BAA4B;IAC1C,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,0BAAW,GAAE,CAAC;AAChB,CAAC;AAHD,oEAGC;AAED,SAAgB,6BAA6B;IAC3C,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;AACjB,CAAC;AAHD,sEAGC;AAED,SAAgB,0BAA0B;IACxC,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;AACjB,CAAC;AAHD,gEAGC;AAED,SAAgB,4BAA4B;IAC1C,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,0BAAW,GAAE,CAAC;AAChB,CAAC;AAHD,oEAGC;AAED,SAAgB,mCAAmC;IACjD,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;AACjB,CAAC;AAHD,kFAGC","file":"register.js","sourcesContent":["import { registerArc } from '@visactor/vrender-kits/register/register-arc';\nimport { registerGroup } from '@visactor/vrender-kits/register/register-group';\nimport { registerLine } from '@visactor/vrender-kits/register/register-line';\nimport { registerPath } from '@visactor/vrender-kits/register/register-path';\nimport { registerRect } from '@visactor/vrender-kits/register/register-rect';\n\nexport function loadLineCrosshairComponent() {\n registerGroup();\n registerLine();\n}\n\nexport function loadCircleCrosshairComponent() {\n registerGroup();\n registerArc();\n}\n\nexport function loadPolygonCrosshairComponent() {\n registerGroup();\n registerPath();\n}\n\nexport function loadRectCrosshairComponent() {\n registerGroup();\n registerRect();\n}\n\nexport function loadSectorCrosshairComponent() {\n registerGroup();\n registerArc();\n}\n\nexport function loadPolygonSectorCrosshairComponent() {\n registerGroup();\n registerPath();\n}\n"]}
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.loadDataZoomComponent = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const register_area_1 = require("@visactor/vrender-kits/register/register-area"), register_line_1 = require("@visactor/vrender-kits/register/register-line"), register_rect_1 = require("@visactor/vrender-kits/register/register-rect"), register_symbol_1 = require("@visactor/vrender-kits/register/register-symbol"), register_1 = require("../tag/register");
|
|
8
8
|
|
|
9
9
|
function loadDataZoomComponent() {
|
|
10
|
-
(0, register_1.loadTagComponent)(), (0,
|
|
11
|
-
(0,
|
|
10
|
+
(0, register_1.loadTagComponent)(), (0, register_rect_1.registerRect)(), (0, register_symbol_1.registerSymbol)(),
|
|
11
|
+
(0, register_area_1.registerArea)(), (0, register_line_1.registerLine)();
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
exports.loadDataZoomComponent = loadDataZoomComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/data-zoom/register.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/data-zoom/register.ts"],"names":[],"mappings":";;;AAAA,iFAA6E;AAC7E,iFAA6E;AAC7E,iFAA6E;AAC7E,qFAAiF;AACjF,8CAAmD;AACnD,SAAgB,qBAAqB;IACnC,IAAA,2BAAgB,GAAE,CAAC;IACnB,IAAA,4BAAY,GAAE,CAAC;IACf,IAAA,gCAAc,GAAE,CAAC;IACjB,IAAA,4BAAY,GAAE,CAAC;IACf,IAAA,4BAAY,GAAE,CAAC;AACjB,CAAC;AAND,sDAMC","file":"register.js","sourcesContent":["import { registerArea } from '@visactor/vrender-kits/register/register-area';\nimport { registerLine } from '@visactor/vrender-kits/register/register-line';\nimport { registerRect } from '@visactor/vrender-kits/register/register-rect';\nimport { registerSymbol } from '@visactor/vrender-kits/register/register-symbol';\nimport { loadTagComponent } from '../tag/register';\nexport function loadDataZoomComponent() {\n loadTagComponent();\n registerRect();\n registerSymbol();\n registerArea();\n registerLine();\n}\n"]}
|
|
@@ -4,10 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.loadEmptyTipComponent = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const register_group_1 = require("@visactor/vrender-kits/register/register-group"), register_image_1 = require("@visactor/vrender-kits/register/register-image"), register_text_1 = require("@visactor/vrender-kits/register/register-text");
|
|
8
8
|
|
|
9
9
|
function loadEmptyTipComponent() {
|
|
10
|
-
(0,
|
|
10
|
+
(0, register_group_1.registerGroup)(), (0, register_text_1.registerText)(), (0,
|
|
11
|
+
register_image_1.registerImage)();
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
exports.loadEmptyTipComponent = loadEmptyTipComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/empty-tip/register.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/empty-tip/register.ts"],"names":[],"mappings":";;;AAAA,mFAA+E;AAC/E,mFAA+E;AAC/E,iFAA6E;AAE7E,SAAgB,qBAAqB;IACnC,IAAA,8BAAa,GAAE,CAAC;IAEhB,IAAA,4BAAY,GAAE,CAAC;IACf,IAAA,8BAAa,GAAE,CAAC;AAClB,CAAC;AALD,sDAKC","file":"register.js","sourcesContent":["import { registerGroup } from '@visactor/vrender-kits/register/register-group';\nimport { registerImage } from '@visactor/vrender-kits/register/register-image';\nimport { registerText } from '@visactor/vrender-kits/register/register-text';\n\nexport function loadEmptyTipComponent() {\n registerGroup();\n // registerRect();\n registerText();\n registerImage();\n}\n"]}
|
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), exports.version = void 0, exports.version = "1.1.0-alpha.
|
|
20
|
+
}), exports.version = void 0, exports.version = "1.1.0-alpha.24", __exportStar(require("./core/base"), exports),
|
|
21
21
|
__exportStar(require("./core/type"), exports), __exportStar(require("./scrollbar"), exports),
|
|
22
22
|
__exportStar(require("./tag"), exports), __exportStar(require("./poptip"), exports),
|
|
23
23
|
__exportStar(require("./crosshair"), exports), __exportStar(require("./label"), exports),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,+CAA6B;AAC7B,wDAAsC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.1.0-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,+CAA6B;AAC7B,wDAAsC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.1.0-alpha.24\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport * from './switch';\nexport * from './label-item';\nexport * from './table-series-number';\n"]}
|
|
@@ -4,10 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.loadIndicatorComponent = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const register_group_1 = require("@visactor/vrender-kits/register/register-group"), register_richtext_1 = require("@visactor/vrender-kits/register/register-richtext"), register_text_1 = require("@visactor/vrender-kits/register/register-text");
|
|
8
8
|
|
|
9
9
|
function loadIndicatorComponent() {
|
|
10
|
-
(0,
|
|
10
|
+
(0, register_group_1.registerGroup)(), (0, register_text_1.registerText)(), (0,
|
|
11
|
+
register_richtext_1.registerRichtext)();
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
exports.loadIndicatorComponent = loadIndicatorComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/indicator/register.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/indicator/register.ts"],"names":[],"mappings":";;;AAAA,mFAA+E;AAC/E,yFAAqF;AACrF,iFAA6E;AAE7E,SAAgB,sBAAsB;IACpC,IAAA,8BAAa,GAAE,CAAC;IAChB,IAAA,4BAAY,GAAE,CAAC;IACf,IAAA,oCAAgB,GAAE,CAAC;AACrB,CAAC;AAJD,wDAIC","file":"register.js","sourcesContent":["import { registerGroup } from '@visactor/vrender-kits/register/register-group';\nimport { registerRichtext } from '@visactor/vrender-kits/register/register-richtext';\nimport { registerText } from '@visactor/vrender-kits/register/register-text';\n\nexport function loadIndicatorComponent() {\n registerGroup();\n registerText();\n registerRichtext();\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { IDefaultGraphicParamsType } from '@visactor/vrender-kits';
|
|
2
|
-
import type
|
|
3
|
-
import { Tag } from '../tag';
|
|
1
|
+
import type { IDefaultGraphicParamsType } from '@visactor/vrender-kits/jsx/graphicType';
|
|
2
|
+
import { Tag, type TagAttributes } from '../tag';
|
|
4
3
|
export declare function VTag(params: IDefaultGraphicParamsType<TagAttributes>): Tag;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/jsx/component-type.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/jsx/component-type.ts"],"names":[],"mappings":";;;AACA,gCAAiD;AAEjD,SAAgB,IAAI,CAAC,MAAgD;IACnE,OAAO,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACjD,CAAC;AAFD,oBAEC","file":"component-type.js","sourcesContent":["import type { IDefaultGraphicParamsType } from '@visactor/vrender-kits/jsx/graphicType';\nimport { Tag, type TagAttributes } from '../tag';\n\nexport function VTag(params: IDefaultGraphicParamsType<TagAttributes>) {\n return new Tag(params ? params.attribute : {});\n}\n"]}
|
package/cjs/label/base.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare class LabelBase<T extends BaseLabelAttrs> extends AnimateComponen
|
|
|
27
27
|
private _lastSelect;
|
|
28
28
|
private _enableAnimation;
|
|
29
29
|
private _exitReleaseState?;
|
|
30
|
+
private _finalLayoutBoundsCache?;
|
|
30
31
|
constructor(attributes: BaseLabelAttrs, options?: ComponentOptions);
|
|
31
32
|
protected labeling(textBounds: IBoundsLike, graphicBounds: IBoundsLike, position?: BaseLabelAttrs['position'], offset?: number): {
|
|
32
33
|
x: number;
|
|
@@ -52,6 +53,8 @@ export declare class LabelBase<T extends BaseLabelAttrs> extends AnimateComponen
|
|
|
52
53
|
protected getRelatedGraphic(item: LabelItem): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>;
|
|
53
54
|
protected getGraphicFinalLayoutAttributes<TAttrs extends Record<string, any> = Record<string, any>>(graphic: IGraphic): TAttrs;
|
|
54
55
|
protected hasGraphicContextFinalLayoutAttributes(graphic?: IGraphic): boolean;
|
|
56
|
+
protected shouldUseGraphicFinalLayoutAttributes(graphic?: IGraphic): boolean;
|
|
57
|
+
protected getGraphicFinalLayoutBounds(graphic?: IGraphic): IAABBBounds | undefined;
|
|
55
58
|
protected _initText(data?: LabelItem[]): (IText | IRichText)[];
|
|
56
59
|
protected _layout(texts: (IText | IRichText)[]): (IText | IRichText)[];
|
|
57
60
|
protected _overlapping(labels: (IText | IRichText)[]): (IRichText | IText)[];
|
|
@@ -72,7 +75,7 @@ export declare class LabelBase<T extends BaseLabelAttrs> extends AnimateComponen
|
|
|
72
75
|
private updateStatesOfLabels;
|
|
73
76
|
protected _handleRelatedGraphicSetState: (e: any) => void;
|
|
74
77
|
protected _smartInvert(labels: (IText | IRichText)[]): void;
|
|
75
|
-
protected _canPlaceInside(textBound: IBoundsLike, shapeBound
|
|
78
|
+
protected _canPlaceInside(textBound: IBoundsLike, shapeBound?: IAABBBounds): boolean;
|
|
76
79
|
release(all?: boolean): void;
|
|
77
80
|
setLocation(point: PointLocationCfg): void;
|
|
78
81
|
disableAnimation(): void;
|