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 2020/10/12 11:08:53 UTC
[incubator-echarts] branch next updated: fix(graph): fix symbol
scale
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new 4901034 fix(graph): fix symbol scale
4901034 is described below
commit 49010349a4b32629b8a691487781cf7f74aea7f4
Author: pissang <bm...@gmail.com>
AuthorDate: Mon Oct 12 19:08:28 2020 +0800
fix(graph): fix symbol scale
---
src/chart/helper/Symbol.ts | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/chart/helper/Symbol.ts b/src/chart/helper/Symbol.ts
index 872b750..535a17e 100644
--- a/src/chart/helper/Symbol.ts
+++ b/src/chart/helper/Symbol.ts
@@ -340,14 +340,18 @@ class Symbol extends graphic.Group {
}
setSymbolScale(scale: number) {
- const emphasisState = this.childAt(0).states.emphasis;
+ const sizeX = this._sizeX;
+ const sizeY = this._sizeY;
+ const symbolPath = this.childAt(0);
+ const emphasisState = symbolPath.states.emphasis;
if (emphasisState) {
- const hoverScale = Math.max(scale * 1.1, 3 / this._sizeY + scale);
- emphasisState.scaleX = this._sizeX * hoverScale;
- emphasisState.scaleY = this._sizeY * hoverScale;
+ const hoverScale = Math.max(scale * 1.1, 3 / sizeY + scale);
+ emphasisState.scaleX = sizeX * hoverScale;
+ emphasisState.scaleY = sizeY * hoverScale;
}
- this.scaleX = this.scaleY = scale;
+ symbolPath.scaleX = sizeX * scale;
+ symbolPath.scaleY = sizeY * scale;
}
fadeOut(cb: () => void, opt?: {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org