Merge pull request #210 from toeverything/feature/fix-selection-on-scroll

feat: fix selection on scroll
This commit is contained in:
MingLIang Wang 2022-08-12 15:54:57 +08:00 committed by GitHub
commit dd0e69d6ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,8 @@ export const SelectionRect = forwardRef<SelectionRef, SelectionProps>(
startPointRef.current &&
endPointRef.current &&
scrollManager.scrollContainer &&
scrollContainerRect.current
scrollContainerRect.current &&
mouseType.current === 'down'
) {
const xSign = DIRECTION_VALUE_MAP[direction[0]] || 0;
const ySign = DIRECTION_VALUE_MAP[direction[1]] || 0;