You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "fanwww (via GitHub)" <gi...@apache.org> on 2025/12/15 12:05:27 UTC

Re: [PR] fix(label): fix labelLine `smooth` can not be reset [echarts]

fanwww commented on code in PR #21425:
URL: https://github.com/apache/echarts/pull/21425#discussion_r2619134122


##########
src/label/labelGuideHelper.ts:
##########
@@ -540,11 +540,22 @@ function setLabelLineState(
     stateObj.ignore = ignore;
     // Set smooth
     let smooth = stateModel.get('smooth');
-    if (smooth && smooth === true) {
-        smooth = 0.3;
+
+    // "smooth" is a boolean logical value
+    if (typeof smooth === 'boolean') {

Review Comment:
   The original code included a logic check for smooth being greater than 0. I'm unsure whether this logic must remain non-negative. If assignments are always made, would it be better to add a Math.max(smooth, 0) check



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org