You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/11/19 09:48:23 UTC
[echarts] branch graphic-animation updated: fix wrong import from lib
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch graphic-animation
in repository https://gitbox.apache.org/repos/asf/echarts.git
The following commit(s) were added to refs/heads/graphic-animation by this push:
new 2eea25e fix wrong import from lib
2eea25e is described below
commit 2eea25e762515aa93708157baa3177a277d7647d
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Nov 19 17:46:26 2021 +0800
fix wrong import from lib
---
src/animation/customGraphicTransition.ts | 2 +-
src/chart/custom/CustomSeries.ts | 2 +-
test/graphic-transition.html | 47 ++++++++++++++++++++++++++++++--
3 files changed, 47 insertions(+), 4 deletions(-)
diff --git a/src/animation/customGraphicTransition.ts b/src/animation/customGraphicTransition.ts
index 7ad28be..ef602bf 100644
--- a/src/animation/customGraphicTransition.ts
+++ b/src/animation/customGraphicTransition.ts
@@ -29,7 +29,7 @@ import { initProps, updateProps } from './basicTrasition';
import { Path } from '../util/graphic';
import { warn } from '../util/log';
import { AnimationOptionMixin, ZRStyleProps } from '../util/types';
-import { Dictionary } from 'zrender/lib/core/types';
+import { Dictionary } from 'zrender/src/core/types';
import { PathStyleProps } from 'zrender';
const LEGACY_TRANSFORM_PROPS_MAP = {
diff --git a/src/chart/custom/CustomSeries.ts b/src/chart/custom/CustomSeries.ts
index 3faaa85..bc11e34 100644
--- a/src/chart/custom/CustomSeries.ts
+++ b/src/chart/custom/CustomSeries.ts
@@ -70,7 +70,7 @@ import {
TransitionBaseDuringAPI,
TransitionDuringAPI
} from '../../animation/customGraphicTransition';
-import { TransformProp } from 'zrender/lib/core/Transformable';
+import { TransformProp } from 'zrender/src/core/Transformable';
export type CustomExtraElementInfo = Dictionary<unknown>;
diff --git a/test/graphic-transition.html b/test/graphic-transition.html
index 8a1b0c3..7b2cf01 100644
--- a/test/graphic-transition.html
+++ b/test/graphic-transition.html
@@ -210,8 +210,51 @@ under the License.
<script>
require(['echarts'/*, 'map/js/china' */], function (echarts) {
- var option;
- // Enter transition
+ var option = {
+ graphic: {
+ elements: [{
+ type: 'circle',
+ x: 200,
+ y: 200,
+ shape: {
+ cx: 0,
+ cy: 0,
+ r: 100
+ },
+ style: {
+ fill: 'gray'
+ }
+ }]
+ }
+ }
+
+ var chart = testHelper.create(echarts, 'main1', {
+ title: [
+ 'Transition all'
+ ],
+ option: option,
+ buttons: [
+ {
+ text: 'Randomize',
+ onclick() {
+ chart.setOption({
+ graphic: {
+ elements: [{
+ x: Math.random() * chart.getWidth(),
+ y: Math.random() * chart.getHeight(),
+ shape: {
+ r: Math.random() * 30 + 50
+ },
+ style: {
+ fill: echarts.color.random()
+ }
+ }]
+ }
+ })
+ }
+ },
+ ]
+ });
});
</script>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org