Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tfineberg4 committed May 21, 2024
1 parent 3044bc5 commit b4aeab7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/visx-brush/src/BaseBrush.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
BrushPageOffset,
} from './types';
import { getPageCoordinates } from './utils';
import debounce from 'lodash/debounce';

Check failure on line 19 in packages/visx-brush/src/BaseBrush.tsx

View workflow job for this annotation

GitHub Actions / build

'lodash' should be listed in the project's dependencies. Run 'npm i -S lodash' to add it

Check failure on line 19 in packages/visx-brush/src/BaseBrush.tsx

View workflow job for this annotation

GitHub Actions / build

`lodash/debounce` import should occur before import of `./BrushHandle`

type PointerHandlerEvent = React.PointerEvent<SVGRectElement>;

Expand Down Expand Up @@ -224,7 +225,7 @@ export default class BaseBrush extends React.Component<BaseBrushProps, BaseBrush
}
};

handleWindowPointerMove = (event: MouseEvent) => {
handleWindowPointerMove = debounce((event: MouseEvent) => {

Check failure on line 228 in packages/visx-brush/src/BaseBrush.tsx

View workflow job for this annotation

GitHub Actions / build

Move arrow function to the outer scope
const { useWindowMoveEvents } = this.props;
const { brushingType, isBrushing, brushPageOffset, start } = this.state;

Expand Down Expand Up @@ -318,7 +319,7 @@ export default class BaseBrush extends React.Component<BaseBrushProps, BaseBrush
return newState;
});
}
};
}, 1);

getExtent = (start: Partial<Point>, end: Partial<Point>) => {
const { brushDirection, width, height } = this.props;
Expand Down

0 comments on commit b4aeab7

Please sign in to comment.