@visactor/vrender 1.0.5 → 1.0.6
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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +44 -18
- package/dist/index.js +44 -18
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +6 -6
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "1.0.
|
|
24
|
+
exports.version = "1.0.6", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
|
|
25
25
|
vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
|
|
26
26
|
vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
|
|
27
27
|
(0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAmF;AACnF,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,OAAO,CAAC;AAE/B,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,2BAAY,GAAE,CAAC;AAEf,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC;AACvC,4DAA0C","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv, registerStar } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"1.0.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAmF;AACnF,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,OAAO,CAAC;AAE/B,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,2BAAY,GAAE,CAAC;AAEf,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC;AACvC,4DAA0C","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv, registerStar } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"1.0.6\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\nregisterStar();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-animate';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -17614,7 +17614,7 @@ class Stage extends Group {
|
|
|
17614
17614
|
return this._cursor;
|
|
17615
17615
|
}
|
|
17616
17616
|
eventPointTransform(e) {
|
|
17617
|
-
const point = this.global.mapToCanvasPoint(e, this.window
|
|
17617
|
+
const point = this.global.mapToCanvasPoint(e, this.window);
|
|
17618
17618
|
return this.stage.window.pointTransform(point.x, point.y);
|
|
17619
17619
|
}
|
|
17620
17620
|
pauseTriggerEvent() {
|
|
@@ -31414,6 +31414,11 @@ class AnimationStateManager {
|
|
|
31414
31414
|
state.executor.stop();
|
|
31415
31415
|
}), this.stateList = null;
|
|
31416
31416
|
}
|
|
31417
|
+
reApplyState(state) {
|
|
31418
|
+
var _a;
|
|
31419
|
+
const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
|
|
31420
|
+
stateInfo && (stateInfo.executor.stop(), stateInfo.executor.execute(stateInfo.animationConfig));
|
|
31421
|
+
}
|
|
31417
31422
|
}
|
|
31418
31423
|
|
|
31419
31424
|
class GraphicStateExtension {
|
|
@@ -31444,12 +31449,19 @@ class GraphicStateExtension {
|
|
|
31444
31449
|
applyUnhighlightState(animationConfig, callback) {
|
|
31445
31450
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
31446
31451
|
}
|
|
31447
|
-
stopAnimationState(state, type) {
|
|
31448
|
-
return this._getAnimationStateManager(this).stopState(state, type), this
|
|
31452
|
+
stopAnimationState(state, type, deep = !1) {
|
|
31453
|
+
return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
|
|
31454
|
+
child.stopAnimationState(state, type, deep);
|
|
31455
|
+
}), this;
|
|
31449
31456
|
}
|
|
31450
31457
|
clearAnimationStates() {
|
|
31451
31458
|
return this._getAnimationStateManager(this).clearState(), this;
|
|
31452
31459
|
}
|
|
31460
|
+
reApplyAnimationState(state, deep = !1) {
|
|
31461
|
+
return this._getAnimationStateManager(this).reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
31462
|
+
child.reApplyAnimationState(state, deep);
|
|
31463
|
+
}), this;
|
|
31464
|
+
}
|
|
31453
31465
|
static extend(graphic) {
|
|
31454
31466
|
return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
|
|
31455
31467
|
}
|
|
@@ -31501,6 +31513,21 @@ class AnimateExtension {
|
|
|
31501
31513
|
getGraphicAttribute(key, prev = !1) {
|
|
31502
31514
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
31503
31515
|
}
|
|
31516
|
+
pauseAnimation(deep = !1) {
|
|
31517
|
+
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
31518
|
+
child.pauseAnimation(deep);
|
|
31519
|
+
});
|
|
31520
|
+
}
|
|
31521
|
+
resumeAnimation(deep = !1) {
|
|
31522
|
+
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
31523
|
+
child.resumeAnimation(deep);
|
|
31524
|
+
});
|
|
31525
|
+
}
|
|
31526
|
+
stopAnimation(deep = !1) {
|
|
31527
|
+
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
31528
|
+
child.stopAnimation(deep);
|
|
31529
|
+
});
|
|
31530
|
+
}
|
|
31504
31531
|
}
|
|
31505
31532
|
|
|
31506
31533
|
function registerAnimate() {
|
|
@@ -32666,7 +32693,7 @@ class GrowCenterIn extends ACustomAnimate {
|
|
|
32666
32693
|
super(from, to, duration, easing, params);
|
|
32667
32694
|
}
|
|
32668
32695
|
onBind() {
|
|
32669
|
-
var _a, _b;
|
|
32696
|
+
var _a, _b, _c;
|
|
32670
32697
|
super.onBind();
|
|
32671
32698
|
const {
|
|
32672
32699
|
from: from,
|
|
@@ -32675,7 +32702,7 @@ class GrowCenterIn extends ACustomAnimate {
|
|
|
32675
32702
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
32676
32703
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
32677
32704
|
const finalAttribute = this.target.getFinalAttribute();
|
|
32678
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
32705
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
32679
32706
|
}
|
|
32680
32707
|
onEnd(cb) {
|
|
32681
32708
|
super.onEnd(cb);
|
|
@@ -32773,7 +32800,7 @@ class GrowHeightIn extends ACustomAnimate {
|
|
|
32773
32800
|
super(from, to, duration, easing, params);
|
|
32774
32801
|
}
|
|
32775
32802
|
onBind() {
|
|
32776
|
-
var _a, _b;
|
|
32803
|
+
var _a, _b, _c;
|
|
32777
32804
|
super.onBind();
|
|
32778
32805
|
const {
|
|
32779
32806
|
from: from,
|
|
@@ -32782,7 +32809,7 @@ class GrowHeightIn extends ACustomAnimate {
|
|
|
32782
32809
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
32783
32810
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
32784
32811
|
const finalAttribute = this.target.getFinalAttribute();
|
|
32785
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
32812
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
32786
32813
|
}
|
|
32787
32814
|
onEnd(cb) {
|
|
32788
32815
|
super.onEnd(cb);
|
|
@@ -34633,16 +34660,15 @@ const moveIn = (graphic, options, animationParameters) => {
|
|
|
34633
34660
|
changedY = 0;
|
|
34634
34661
|
"negative" === orient && (changedX = null !== (_a = layoutRect.width) && void 0 !== _a ? _a : graphic.stage.viewWidth, changedY = null !== (_b = layoutRect.height) && void 0 !== _b ? _b : graphic.stage.viewHeight), changedX += offset, changedY += offset;
|
|
34635
34662
|
const point = isFunction$1(pointOpt) ? pointOpt.call(null, null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, animationParameters) : pointOpt,
|
|
34636
|
-
|
|
34637
|
-
|
|
34638
|
-
|
|
34639
|
-
|
|
34640
|
-
finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
|
|
34663
|
+
finalAttrsX = graphic.getGraphicAttribute("x"),
|
|
34664
|
+
finalAttrsY = graphic.getGraphicAttribute("y"),
|
|
34665
|
+
fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$1(point.x) ? point.x : changedX,
|
|
34666
|
+
fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$1(point.y) ? point.y : changedY;
|
|
34641
34667
|
switch (direction) {
|
|
34642
34668
|
case "x":
|
|
34643
34669
|
return {
|
|
34644
34670
|
from: {
|
|
34645
|
-
x: fromX
|
|
34671
|
+
x: excludeChannels.includes("x") ? finalAttrsX : fromX
|
|
34646
34672
|
},
|
|
34647
34673
|
to: {
|
|
34648
34674
|
x: finalAttrsX
|
|
@@ -34690,7 +34716,7 @@ const moveOut = (graphic, options, animationParameters) => {
|
|
|
34690
34716
|
case "x":
|
|
34691
34717
|
return {
|
|
34692
34718
|
from: {
|
|
34693
|
-
x: graphic.
|
|
34719
|
+
x: graphic.getGraphicAttribute("x")
|
|
34694
34720
|
},
|
|
34695
34721
|
to: {
|
|
34696
34722
|
x: fromX
|
|
@@ -34699,7 +34725,7 @@ const moveOut = (graphic, options, animationParameters) => {
|
|
|
34699
34725
|
case "y":
|
|
34700
34726
|
return {
|
|
34701
34727
|
from: {
|
|
34702
|
-
y: graphic.
|
|
34728
|
+
y: graphic.getGraphicAttribute("y")
|
|
34703
34729
|
},
|
|
34704
34730
|
to: {
|
|
34705
34731
|
y: fromY
|
|
@@ -34708,8 +34734,8 @@ const moveOut = (graphic, options, animationParameters) => {
|
|
|
34708
34734
|
default:
|
|
34709
34735
|
return {
|
|
34710
34736
|
from: {
|
|
34711
|
-
x: graphic.
|
|
34712
|
-
y: graphic.
|
|
34737
|
+
x: graphic.getGraphicAttribute("x"),
|
|
34738
|
+
y: graphic.getGraphicAttribute("y")
|
|
34713
34739
|
},
|
|
34714
34740
|
to: {
|
|
34715
34741
|
x: fromX,
|
|
@@ -35055,7 +35081,7 @@ const registerCustomAnimate = () => {
|
|
|
35055
35081
|
AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight);
|
|
35056
35082
|
};
|
|
35057
35083
|
|
|
35058
|
-
const version = "1.0.
|
|
35084
|
+
const version = "1.0.6";
|
|
35059
35085
|
preLoadAllModule();
|
|
35060
35086
|
if (isBrowserEnv()) {
|
|
35061
35087
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -17620,7 +17620,7 @@
|
|
|
17620
17620
|
return this._cursor;
|
|
17621
17621
|
}
|
|
17622
17622
|
eventPointTransform(e) {
|
|
17623
|
-
const point = this.global.mapToCanvasPoint(e, this.window
|
|
17623
|
+
const point = this.global.mapToCanvasPoint(e, this.window);
|
|
17624
17624
|
return this.stage.window.pointTransform(point.x, point.y);
|
|
17625
17625
|
}
|
|
17626
17626
|
pauseTriggerEvent() {
|
|
@@ -31420,6 +31420,11 @@
|
|
|
31420
31420
|
state.executor.stop();
|
|
31421
31421
|
}), this.stateList = null;
|
|
31422
31422
|
}
|
|
31423
|
+
reApplyState(state) {
|
|
31424
|
+
var _a;
|
|
31425
|
+
const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
|
|
31426
|
+
stateInfo && (stateInfo.executor.stop(), stateInfo.executor.execute(stateInfo.animationConfig));
|
|
31427
|
+
}
|
|
31423
31428
|
}
|
|
31424
31429
|
|
|
31425
31430
|
class GraphicStateExtension {
|
|
@@ -31450,12 +31455,19 @@
|
|
|
31450
31455
|
applyUnhighlightState(animationConfig, callback) {
|
|
31451
31456
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
31452
31457
|
}
|
|
31453
|
-
stopAnimationState(state, type) {
|
|
31454
|
-
return this._getAnimationStateManager(this).stopState(state, type), this
|
|
31458
|
+
stopAnimationState(state, type, deep = !1) {
|
|
31459
|
+
return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
|
|
31460
|
+
child.stopAnimationState(state, type, deep);
|
|
31461
|
+
}), this;
|
|
31455
31462
|
}
|
|
31456
31463
|
clearAnimationStates() {
|
|
31457
31464
|
return this._getAnimationStateManager(this).clearState(), this;
|
|
31458
31465
|
}
|
|
31466
|
+
reApplyAnimationState(state, deep = !1) {
|
|
31467
|
+
return this._getAnimationStateManager(this).reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
31468
|
+
child.reApplyAnimationState(state, deep);
|
|
31469
|
+
}), this;
|
|
31470
|
+
}
|
|
31459
31471
|
static extend(graphic) {
|
|
31460
31472
|
return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
|
|
31461
31473
|
}
|
|
@@ -31507,6 +31519,21 @@
|
|
|
31507
31519
|
getGraphicAttribute(key, prev = !1) {
|
|
31508
31520
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
31509
31521
|
}
|
|
31522
|
+
pauseAnimation(deep = !1) {
|
|
31523
|
+
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
31524
|
+
child.pauseAnimation(deep);
|
|
31525
|
+
});
|
|
31526
|
+
}
|
|
31527
|
+
resumeAnimation(deep = !1) {
|
|
31528
|
+
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
31529
|
+
child.resumeAnimation(deep);
|
|
31530
|
+
});
|
|
31531
|
+
}
|
|
31532
|
+
stopAnimation(deep = !1) {
|
|
31533
|
+
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
31534
|
+
child.stopAnimation(deep);
|
|
31535
|
+
});
|
|
31536
|
+
}
|
|
31510
31537
|
}
|
|
31511
31538
|
|
|
31512
31539
|
function registerAnimate() {
|
|
@@ -32672,7 +32699,7 @@
|
|
|
32672
32699
|
super(from, to, duration, easing, params);
|
|
32673
32700
|
}
|
|
32674
32701
|
onBind() {
|
|
32675
|
-
var _a, _b;
|
|
32702
|
+
var _a, _b, _c;
|
|
32676
32703
|
super.onBind();
|
|
32677
32704
|
const {
|
|
32678
32705
|
from: from,
|
|
@@ -32681,7 +32708,7 @@
|
|
|
32681
32708
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
32682
32709
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
32683
32710
|
const finalAttribute = this.target.getFinalAttribute();
|
|
32684
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
32711
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
32685
32712
|
}
|
|
32686
32713
|
onEnd(cb) {
|
|
32687
32714
|
super.onEnd(cb);
|
|
@@ -32779,7 +32806,7 @@
|
|
|
32779
32806
|
super(from, to, duration, easing, params);
|
|
32780
32807
|
}
|
|
32781
32808
|
onBind() {
|
|
32782
|
-
var _a, _b;
|
|
32809
|
+
var _a, _b, _c;
|
|
32783
32810
|
super.onBind();
|
|
32784
32811
|
const {
|
|
32785
32812
|
from: from,
|
|
@@ -32788,7 +32815,7 @@
|
|
|
32788
32815
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
32789
32816
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
32790
32817
|
const finalAttribute = this.target.getFinalAttribute();
|
|
32791
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
32818
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
32792
32819
|
}
|
|
32793
32820
|
onEnd(cb) {
|
|
32794
32821
|
super.onEnd(cb);
|
|
@@ -34639,16 +34666,15 @@
|
|
|
34639
34666
|
changedY = 0;
|
|
34640
34667
|
"negative" === orient && (changedX = null !== (_a = layoutRect.width) && void 0 !== _a ? _a : graphic.stage.viewWidth, changedY = null !== (_b = layoutRect.height) && void 0 !== _b ? _b : graphic.stage.viewHeight), changedX += offset, changedY += offset;
|
|
34641
34668
|
const point = isFunction$1(pointOpt) ? pointOpt.call(null, null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, animationParameters) : pointOpt,
|
|
34642
|
-
|
|
34643
|
-
|
|
34644
|
-
|
|
34645
|
-
|
|
34646
|
-
finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
|
|
34669
|
+
finalAttrsX = graphic.getGraphicAttribute("x"),
|
|
34670
|
+
finalAttrsY = graphic.getGraphicAttribute("y"),
|
|
34671
|
+
fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$1(point.x) ? point.x : changedX,
|
|
34672
|
+
fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$1(point.y) ? point.y : changedY;
|
|
34647
34673
|
switch (direction) {
|
|
34648
34674
|
case "x":
|
|
34649
34675
|
return {
|
|
34650
34676
|
from: {
|
|
34651
|
-
x: fromX
|
|
34677
|
+
x: excludeChannels.includes("x") ? finalAttrsX : fromX
|
|
34652
34678
|
},
|
|
34653
34679
|
to: {
|
|
34654
34680
|
x: finalAttrsX
|
|
@@ -34696,7 +34722,7 @@
|
|
|
34696
34722
|
case "x":
|
|
34697
34723
|
return {
|
|
34698
34724
|
from: {
|
|
34699
|
-
x: graphic.
|
|
34725
|
+
x: graphic.getGraphicAttribute("x")
|
|
34700
34726
|
},
|
|
34701
34727
|
to: {
|
|
34702
34728
|
x: fromX
|
|
@@ -34705,7 +34731,7 @@
|
|
|
34705
34731
|
case "y":
|
|
34706
34732
|
return {
|
|
34707
34733
|
from: {
|
|
34708
|
-
y: graphic.
|
|
34734
|
+
y: graphic.getGraphicAttribute("y")
|
|
34709
34735
|
},
|
|
34710
34736
|
to: {
|
|
34711
34737
|
y: fromY
|
|
@@ -34714,8 +34740,8 @@
|
|
|
34714
34740
|
default:
|
|
34715
34741
|
return {
|
|
34716
34742
|
from: {
|
|
34717
|
-
x: graphic.
|
|
34718
|
-
y: graphic.
|
|
34743
|
+
x: graphic.getGraphicAttribute("x"),
|
|
34744
|
+
y: graphic.getGraphicAttribute("y")
|
|
34719
34745
|
},
|
|
34720
34746
|
to: {
|
|
34721
34747
|
x: fromX,
|
|
@@ -35061,7 +35087,7 @@
|
|
|
35061
35087
|
AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight);
|
|
35062
35088
|
};
|
|
35063
35089
|
|
|
35064
|
-
const version = "1.0.
|
|
35090
|
+
const version = "1.0.6";
|
|
35065
35091
|
preLoadAllModule();
|
|
35066
35092
|
if (isBrowserEnv()) {
|
|
35067
35093
|
loadBrowserEnv(container);
|