Skip to content

Commit

Permalink
Update packages/x-charts/src/context/DrawingProvider.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Jose C Quintas Jr <[email protected]>
Signed-off-by: Alexandre Fauquette <[email protected]>
  • Loading branch information
alexfauquette and JCQuintas authored Jul 19, 2024
1 parent f36e711 commit 3940f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/x-charts/src/context/DrawingProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ export function DrawingProvider(props: DrawingProviderProps) {
const chartId = useId();

const isPointInside = React.useCallback<DrawingArea['isPointInside']>(
({ x, y }, targetEvent) => {
({ x, y }, targetElement) => {
// For element allowed to overflow, wrapping them in <g data-drawing-container /> 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 (
Expand Down

0 comments on commit 3940f64

Please sign in to comment.