You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/07/02 08:07:20 UTC

[GitHub] [echarts] pissang commented on a change in pull request #15243: fix(pie/sunburst): fix `borderRadius` can't be reset in pie series and sunburst series when setting it to `null` or `undefined`

pissang commented on a change in pull request #15243:
URL: https://github.com/apache/echarts/pull/15243#discussion_r662822638



##########
File path: src/chart/helper/pieHelper.ts
##########
@@ -24,11 +24,12 @@ import { parsePercent } from 'zrender/src/contain/text';
 
 export function getSectorCornerRadius(
     model: Model<{ borderRadius?: string | number | (string | number)[] }>,
-    shape: Pick<Sector['shape'], 'r0' | 'r'>
+    shape: Pick<Sector['shape'], 'r0' | 'r'>,
+    zeroIfNull?: boolean
 ) {
     let cornerRadius = model.get('borderRadius');
     if (cornerRadius == null) {
-        return null;
+        return zeroIfNull ? {innerCornerRadius: 0, cornerRadius: 0} : null;

Review comment:
       I think it's fine to return `{ innerCornerRadius: 0, cornerRadius: 0 }` directly. It will make this function simpler. 




-- 
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