Open Nonoizz opened 1 year ago
@Nonoizz
Sounds like a good idea.
I'll add it in the next update.
@Nonoizz @daybrush
Yes, This is a very good idea. I am also looking forward to add to improve UX.
Possible config:
snapRotation: true,
snapRotationThreshold: 1, // +/- 1 deg
snapRotationDegrees: [
0,
90,
180,
270
]
@jadiagaurang @Nonoizz
croact-moveable
0.4.0@moveable/helper
0.1.2lit-moveable
0.25.0moveable
0.48.0preact-moveable
0.50.0react-moveable
0.51.0svelte-moveable
0.40.0vue-moveable
2.0.0-beta.76vue3-moveable
0.23.0ngx-moveable
0.45.0moveable's new version is released.
snapRotationThreshold
(default: 5), snapRotationDegrees
(default: []) props are added
See this example: https://daybrush.com/moveable/storybook/?path=/story/snap-bound--snap-rotations
Amazing! nice job!
@daybrush
I tried this new config. It worked very well. Thanks again!
@daybrush You accidentally named this snapRotationDegress
instead of snapRotationDegrees
, even though in the Storybook you shared its spelled correctly.
@davidalejandroaguilar
Oh sorry, I'll fix it in the next version.
@jadiagaurang @Nonoizz @davidalejandroaguilar
croact-moveable
0.5.0@moveable/helper
0.1.3lit-moveable
0.26.0moveable
0.49.0preact-moveable
0.51.0react-moveable
0.52.0svelte-moveable
0.41.0vue-moveable
2.0.0-beta.77vue3-moveable
0.24.0ngx-moveable
0.46.0moveable's new version is released.
Change prop name snapRotationDegress
to snapRotationDegrees
.
Check it again.
Environments
Description
When using rotate, i would like the 90 degrees angle (0, 90, 180, 270) to be blocked when the value is close. For example
It only rounds when the value is close of 0, 90, 180, 270
check this for inspiration:
What's the best solution to achieve this kind of behavior ?
Thanks for reading