Are you planning to add the snap option?
For example, while holding down the shift key, it is easy to adjust the rotation to 0, 90, 180 and 270 degrees.
@comiewcom
Hi ~ :)
You probably mean throttleRotate.
Use as follows.
```jsx
/>
Is it possible to apply a snap only when approaching 0, 90, 180, or 270 degrees?
Thank you for the wonderful project.
@comiewcom
Thank you :)
Unfortunately, I don't know your angle, so I have to do it manually now.
<Moveable
onRotate={({ beforeDelta }) => {
this.rotation += beforeDelta;
const rotation = Math.floor(this.rotation / 90) * 90;
console.log(rotation);
}}
/>
Instead, the function of the issue will replace it.
https://github.com/daybrush/moveable/issues/6
@comiewcom
Moveable 0.8.0 is released!!!
You can use set methods and beforeRotate for absolute value.
let rotation = 10;
<Moveable
throttleRotate={90}
onRotateStart={({ set }) => {
set(rotation);
}}
onRotate={({ beforeRotate }) => {
console.log(beforeRotate);
rotation = beforeRotate;
}}
/>