-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update react-moveable and disable snap distance #488
Conversation
Size Change: +5.49 kB (1%) Total Size: 351 kB
ℹ️ View Unchanged
|
…-wp into update/react-moveable
@@ -29,6 +29,7 @@ import objectWithout from '../../utils/objectWithout'; | |||
import { useTransform } from '../transform'; | |||
import { useUnits } from '../../units'; | |||
import { getDefinitionForType } from '../../elements'; | |||
import { useGlobalKeyDownEffect, useGlobalKeyUpEffect } from '../keyboard'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since single- and multiselection seem to share the snapping props, would it perhaps make sense to create the key handler in Selection
and set the snapping props there instead to pass down? Or alternatively use an util for getting the snapping props. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a lot more we can refactor between the two, I'd leave this for another PR
Closes #285, Closes #370
Changes
react-moveable
to0.18.1
keyup
,keypress
orkeydown
inuseKeyDownEffect