提交 1131bad0 编写于 作者: P pissang

fix: add disableLabelAnimation for several series

上级 f9307c75
......@@ -178,6 +178,7 @@ class MapView extends ChartView {
}
}
});
(circle as ECElement).disableLabelAnimation = true;
if (!labelModel.get('position')) {
circle.setTextConfig({
position: 'bottom'
......
......@@ -19,7 +19,7 @@
import * as graphic from '../../util/graphic';
import * as zrUtil from 'zrender/src/core/util';
import { LayoutOrient, Payload } from '../../util/types';
import { LayoutOrient, Payload, ECElement } from '../../util/types';
import { PathProps } from 'zrender/src/graphic/Path';
import SankeySeriesModel, { SankeyEdgeItemOption, SankeyNodeItemOption } from './SankeySeries';
import ChartView from '../../view/Chart';
......@@ -258,6 +258,8 @@ class SankeyView extends ChartView {
style: itemModel.getModel('itemStyle').getItemStyle()
});
(rect as ECElement).disableLabelAnimation = true;
const hoverStyle = itemModel.getModel(['emphasis', 'itemStyle']).getItemStyle();
graphic.setLabelStyle(
......
......@@ -35,7 +35,8 @@ import {
LabelLayoutOptionCallback,
LabelLayoutOptionCallbackParams,
LabelLineOption,
Dictionary
Dictionary,
ECElement
} from '../util/types';
import { parsePercent } from '../util/number';
import ChartView from '../view/Chart';
......@@ -480,7 +481,7 @@ class LabelManager {
const textEl = el.getTextContent();
const guideLine = el.getTextGuideLine();
// Animate
if (textEl && !textEl.ignore && !textEl.invisible) {
if (textEl && !textEl.ignore && !textEl.invisible && !(el as ECElement).disableLabelAnimation) {
const layoutStore = labelLayoutInnerStore(textEl);
const oldLayout = layoutStore.oldLayout;
const newProps = {
......
......@@ -110,6 +110,11 @@ export interface ECElement extends Element {
highlighted?: boolean;
selected?: boolean;
z2EmphasisLift?: number;
/**
* Force disable animation on any condition
*/
disableLabelAnimation?: boolean
}
export interface DataHost {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册