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:38:19 UTC
[GitHub] [echarts] plainheart 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`
plainheart commented on a change in pull request #15243:
URL: https://github.com/apache/echarts/pull/15243#discussion_r662842610
##########
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:
But that will make the other states incorrect. For example, we specify the `borderRadius` as `5` in the normal state, what expected should be also `5` in the emphasis state, but if we use directly `{ innerCornerRadius: 0, cornerRadius: 0 }`, it will break this. Thus using `null` is reasonable.
--
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