daybrush / moveable

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

How to display snap distance when drag? #142

Closed ladifire closed 4 years ago

ladifire commented 4 years ago

Please tell me how to display snap distance as following photo: Screenshot from 2020-01-03 16-48-08

Where: sfs is distance (px)

daybrush commented 4 years ago

@ladifire

It doesn't provide the following features yet.

I will add this feature in a future version.

ladifire commented 4 years ago

Thanks you!

daybrush commented 4 years ago

@ladifire

Moveable 0.14.0 is released. Thank you :)

ladifire commented 4 years ago

@daybrush I think the decimal number for snap distance is not necessary, you should round it up. And one more problem:

See this demo: https://codesandbox.io/s/react-moveable-with-full-drag-select-wb0so and try drag "test_33" element.

When there's at least one SAME size element with DRAGGING ELEMENT, snap display 3 snap lines. This is not necessary.

Thanks you!

daybrush commented 4 years ago

@ladifire I will remove duplicate snap size display and add snapDigit props

daybrush commented 4 years ago

@ladifire

Use snapDigit. (now default is 0) (previous 4)

https://daybrush.com/moveable/release/latest/doc/Moveable.html#snapDigit