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


##########
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:
   Will it be simpler if we change this code block as follows?
   
   ```ts
   let smooth = stateModel.get('smooth');
   smooth  = smooth === true ? 0.3 : +smooth || 0;
   
   // ...
   
   // always set the `smooth` property
   (stateObj.shape as Polyline['shape']).smooth = smooth;
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to