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