-
Notifications
You must be signed in to change notification settings - Fork 7
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
Move with Handle #10
Comments
This is available in v2. It will look something like this const MyDraggable = ({initialPosition, children}) => {
const [{x, y}, {
onMouseDown,
onTouchStart,
...positionProps
}] = usePosition(initialPosition, {});
return (
<div style={{transform: `translate3d(${x}px, ${y}px, 0)`}}>
<div
className="drag-handle"
onMouseDown={onMouseDown}
onTouchStart={onTouchStart}/>
<div className="content">{children}</div>
</div>
} |
@pixelass Do you know when you'd expect to release v2? |
I'm targeting the end of this month. Things are looking good. There are minor things that need to be changed/added back in. |
@pixelass I'm not trying to rush, only assist. Would it be useful for you to have me begin implementing |
The API will remain almost unchanged. I am currently struggling with minor features (e.g. aspect-ratio resizing) I also need to refactor the new snapping logic (currently working on that) I will try to finish the snapping and then release a beta before I add aspect-ratio.I should be able to finish it within the next one or two days. I hope that helps. Besides that I'm happy for any help offered. I am especially missing documentation and tests which should both be present before a stable v2 will be released. Feel free to open new issues to discuss this further. |
Is your feature request related to a problem? Please describe.
Instead of the entire Box being draggable, it would be nice if we could associate a
moveHandle
or something to a specific component so that the rest of the box does not steal away pointer-events.The text was updated successfully, but these errors were encountered: