react-sketch-canvas icon indicating copy to clipboard operation
react-sketch-canvas copied to clipboard

Is there a way to rotate the canvas?

Open akashdeepsinghal opened this issue 4 years ago • 5 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I am using the module to annotate images by setting the image as the background and canvas as a layer on top of the image. Now when I am trying to rotate the canvas, the background image is rotated but the pen behaves weird by moving in different directions.

Can we please have an option for a rotating background?

Here is the small video snippet I created for a better understanding:- https://www.loom.com/share/28effbb145bf4fd88af7bc4f2bc60d52

akashdeepsinghal avatar Jul 16 '21 07:07 akashdeepsinghal

Very interesting use case!

I'll try out something this weekend. Incase you figure out a solution please send a pull request.

vinothpandian avatar Jul 16 '21 07:07 vinothpandian

Hi Vinoth,

Did you get a chance to look at it? Would really appreciate.

akashdeepsinghal avatar Aug 06 '21 07:08 akashdeepsinghal

Hi @akashdeepsinghal. Sorry, I did not have the time to look at it.

As a workaround, for now, you can use the underlying Canvas implementation and update the paths on rotation. You can look at issue #14 as a reference.

Once I have time (maybe October), I will add a flag to enable rotation.

vinothpandian avatar Aug 07 '21 17:08 vinothpandian

Hey @vinothpandian If possible, can you please look into it? This would be really really helpful for us. 🙏🏻

akashdeepsinghal avatar Sep 12 '21 00:09 akashdeepsinghal

@akashdeepsinghal Sure. I will try to add this feature in the upcoming version

vinothpandian avatar Sep 12 '21 17:09 vinothpandian