From 3940f64e87daada1eb9eeaa10597572853c99f56 Mon Sep 17 00:00:00 2001 From: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com> Date: Fri, 19 Jul 2024 12:51:35 +0200 Subject: [PATCH] Update packages/x-charts/src/context/DrawingProvider.tsx Co-authored-by: Jose C Quintas Jr Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com> --- packages/x-charts/src/context/DrawingProvider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/x-charts/src/context/DrawingProvider.tsx b/packages/x-charts/src/context/DrawingProvider.tsx index 37585c2b54ed0..26dee3c5a4147 100644 --- a/packages/x-charts/src/context/DrawingProvider.tsx +++ b/packages/x-charts/src/context/DrawingProvider.tsx @@ -87,9 +87,9 @@ export function DrawingProvider(props: DrawingProviderProps) { const chartId = useId(); const isPointInside = React.useCallback( - ({ x, y }, targetEvent) => { + ({ x, y }, targetElement) => { // For element allowed to overflow, wrapping them in make them fully part of the drawing area. - if (targetEvent && targetEvent.closest('[data-drawing-container]')) { + if (targetElement && targetElement.closest('[data-drawing-container]')) { return true; } return (