Skip to content

Commit

Permalink
fix: do not render when baseOpacity is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoHe committed Jun 18, 2024
1 parent 7413c9c commit 64a08bc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ export class VChartRender extends DefaultCanvasRectRender implements IGraphicRen
themeAttribute: IThemeAttribute
) => boolean
) {
const { baseOpacity = 1 } = chart.attribute;
let { baseOpacity = 1 } = chart.attribute;
if (baseOpacity <= 0) {
return;
}
context.baseGlobalAlpha *= baseOpacity;
super.drawShape(chart, context, x, y, drawContext, params, fillCb, strokeCb);
context.baseGlobalAlpha /= baseOpacity;
Expand Down

0 comments on commit 64a08bc

Please sign in to comment.