edemaine / cocreate

Cocreate Shared Whiteboard/Drawing
MIT License
209 stars 27 forks source link

Rotation/reflection #209

Open edemaine opened 2 years ago

edemaine commented 2 years ago

Surprisingly, this doesn't seem to be an issue already, but it's frequently requested at this point.

The first two make sense as part of a selection overlay menu (#184).

jaltekruse commented 2 years ago

I like the UI for rotation that is used in the fabric.js canvas library. It leaves an extra handle hanging out that can be dragged for arbitrary rotation. It also allows for rotating elements in groups and can resolve multiple separate rotations applied to different sub-groupings over time (where the point of rotation changes with different selections), as show in this screen-capture. You can possibly check out their codebase for some inspiration while implementing this feature. If you'd like some help I could probably spend some time working on this.

https://user-images.githubusercontent.com/365366/174153224-a52622ec-62b6-46aa-86ca-c2ebf919043a.mp4