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/06/22 07:18:57 UTC
[incubator-echarts] branch label-enhancement updated:
fix(labelLine): only set smooth when it's changed.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch label-enhancement
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/label-enhancement by this push:
new 306779e fix(labelLine): only set smooth when it's changed.
306779e is described below
commit 306779e26c3793147d75c95384067adea7565916
Author: pissang <bm...@gmail.com>
AuthorDate: Mon Jun 22 15:18:35 2020 +0800
fix(labelLine): only set smooth when it's changed.
---
src/label/labelGuideHelper.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/label/labelGuideHelper.ts b/src/label/labelGuideHelper.ts
index 0d872e0..bc14b44 100644
--- a/src/label/labelGuideHelper.ts
+++ b/src/label/labelGuideHelper.ts
@@ -474,7 +474,9 @@ function setLabelLineState(
smooth = 0.3;
}
stateObj.shape = stateObj.shape || {};
- (stateObj.shape as Polyline['shape']).smooth = smooth as number;
+ if (smooth > 0) {
+ (stateObj.shape as Polyline['shape']).smooth = smooth as number;
+ }
const styleObj = stateModel.getModel('lineStyle').getLineStyle();
isNormal ? labelLine.useStyle(styleObj) : stateObj.style = styleObj;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org