From da3d3df25b80fa4375f4ae82ddf3d35e3639a45c Mon Sep 17 00:00:00 2001 From: Kenan Date: Fri, 12 Jan 2024 10:26:48 +0000 Subject: [PATCH] remove default clipWidth --- packages/victory-canvas/src/canvas-group.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/victory-canvas/src/canvas-group.tsx b/packages/victory-canvas/src/canvas-group.tsx index b6f30f8e2..c83bcb04e 100644 --- a/packages/victory-canvas/src/canvas-group.tsx +++ b/packages/victory-canvas/src/canvas-group.tsx @@ -12,7 +12,7 @@ export interface CanvasGroupProps { export const CanvasGroup = (props: CanvasGroupProps) => { const canvasRef = React.useRef(null); - const { children, width = 0, height = 0, clipWidth = 0, padding } = props; + const { children, width = 0, height = 0, clipWidth, padding } = props; const clear = React.useCallback( (ctx: CanvasRenderingContext2D) => { @@ -34,7 +34,7 @@ export const CanvasGroup = (props: CanvasGroupProps) => { ctx.clearRect( width - paddingRight, 0, - (maxClipWidth - clipWidth) * -1, + clipWidth ? (maxClipWidth - clipWidth) * -1 : 0, height, ); },