daybrush / moveable

Moveable! Draggable! Resizable! Scalable! Rotatable! Warpable! Pinchable! Groupable! Snappable!
https://daybrush.com/moveable/
MIT License
10.08k stars 618 forks source link

Snap to common element distances #200

Closed wassgha closed 4 years ago

wassgha commented 4 years ago

Would be great if this could support snapping the common distance between existing elements. There are a few cases:

Base case (horizontal): ezgif com-crop (1)

Vertical: ezgif com-video-to-gif (28)

Rotated: ezgif com-video-to-gif (29)

Multiple: ezgif com-video-to-gif (30)

daybrush commented 4 years ago

@wassgha

Thank you :) I'll try it for next release.

daybrush commented 4 years ago

@wassgha

Maybe it feels like this.

무제

wassgha commented 4 years ago

Looks awesome! Thank you :)

daybrush commented 4 years ago

@wassgha

moveable's new version is released. Check it again. Thank you :)

use snapGap props. (default: true)

wassgha commented 4 years ago

Works great! Awesome work! 🎉 One little thing, when isDisplaySnapDigit={false} the number is displayed but set to 0. Would be great if the number was completely hidden. Bonus points if this is controlled by a different boolean (e.g. isGapSnapDigitVisible). Thank you!

daybrush commented 4 years ago

@wassgha

react-moveable 0.19.1 is released.

Check it again.