From b4aeab754f02512f57a730d6fc7f6a522e72840d Mon Sep 17 00:00:00 2001 From: Tessa Date: Tue, 21 May 2024 15:15:23 -0600 Subject: [PATCH] fixed --- packages/visx-brush/src/BaseBrush.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/visx-brush/src/BaseBrush.tsx b/packages/visx-brush/src/BaseBrush.tsx index f31886074..b23afd6db 100644 --- a/packages/visx-brush/src/BaseBrush.tsx +++ b/packages/visx-brush/src/BaseBrush.tsx @@ -16,6 +16,7 @@ import { BrushPageOffset, } from './types'; import { getPageCoordinates } from './utils'; +import debounce from 'lodash/debounce'; type PointerHandlerEvent = React.PointerEvent; @@ -224,7 +225,7 @@ export default class BaseBrush extends React.Component { + handleWindowPointerMove = debounce((event: MouseEvent) => { const { useWindowMoveEvents } = this.props; const { brushingType, isBrushing, brushPageOffset, start } = this.state; @@ -318,7 +319,7 @@ export default class BaseBrush extends React.Component, end: Partial) => { const { brushDirection, width, height } = this.props;