This is an automated email from the ASF dual-hosted git repository. shenyi pushed a commit to branch enhance-morph in repository https://gitbox.apache.org/repos/asf/echarts.git
The following commit(s) were added to refs/heads/enhance-morph by this push: new 87e58b9 feat(ut): fix some null access bug. 87e58b9 is described below commit 87e58b9acb2eda867008c9c729083262d40e5fd5 Author: pissang <bm2736...@gmail.com> AuthorDate: Thu Jun 17 17:03:58 2021 +0800 feat(ut): fix some null access bug. --- src/animation/universalTransition.ts | 10 ++++++---- test/custom-shape-morphing2.html | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/animation/universalTransition.ts b/src/animation/universalTransition.ts index 9e6f97c..1b44203 100644 --- a/src/animation/universalTransition.ts +++ b/src/animation/universalTransition.ts @@ -92,9 +92,11 @@ function transitionBetween( rawFrom: Path, rawTo: Path, animationCfg: ElementAnimateConfig ) { - to.animateFrom({ - style: rawFrom.style - }, animationCfg); + if (rawFrom || from) { + to.animateFrom({ + style: (rawFrom || from).style + }, animationCfg); + } } function fadeInElement(newEl: Element, newSeries: SeriesModel, newIndex: number) { @@ -152,7 +154,7 @@ function transitionBetween( const dimInfo = keyDim && data.getDimensionInfo(keyDim); const dimOrdinalMeta = dimInfo && dimInfo.ordinalMeta; - if (keyDim) { + if (dimInfo) { // Get from encode.itemGroupId. const key = data.get(dimInfo.name, dataIndex); if (dimOrdinalMeta) { diff --git a/test/custom-shape-morphing2.html b/test/custom-shape-morphing2.html index 39976d1..8b5d2bc 100644 --- a/test/custom-shape-morphing2.html +++ b/test/custom-shape-morphing2.html @@ -397,7 +397,7 @@ under the License. encode: { x: 'M_TAG', y: 'ATA', - dataGroupId: 'M_TAG', + itemGroupId: 'M_TAG', tooltip: ['M_TAG', 'ATA'] }, renderItem: function (params, api) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org