Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setTransformOrigin && exeRotate #76

Open
sysmaya opened this issue Jan 4, 2023 · 6 comments
Open

setTransformOrigin && exeRotate #76

sysmaya opened this issue Jan 4, 2023 · 6 comments

Comments

@sysmaya
Copy link

sysmaya commented Jan 4, 2023

Hello, Thank you for such an excellent plugin.
Could you post some help, or maybe an example of how to use exeRotate() using an arbitrary center point?
I have tried using setTransformOrigin() before exeRotate()... but no luck.
Thank you.

@nichollascarter
Copy link
Owner

nichollascarter commented Jan 4, 2023

Hello @sysmaya
Please take a look into this example

You can use Arrow Up or Arrow Down to perform rotation.

@sysmaya
Copy link
Author

sysmaya commented Jan 4, 2023

HI @nichollascarter

your example is very clear.
But in my case, I can't turn transformOrigin:true on. Because that option makes all resize operations run with that center (very bad, very ugly) The correct thing in my opinion would be to use transformOrigin: true only for rotation operations.
So I had to do some tricks, to reimplement the rotation in my application.

iDraw-SVG-editor-online

@nichollascarter
Copy link
Owner

@sysmaya , what if set resizable option to false and use it along with transformOrigin ?

@sysmaya
Copy link
Author

sysmaya commented Jan 4, 2023

@sysmaya , what if set resizable option to false and use it along with transformOrigin ?

The idea is that it worked the SAME as Corel, Inskape.
The reference point only affects the rotation.

@sysmaya
Copy link
Author

sysmaya commented Jan 9, 2023

Here you can see the progress of the project that I am developing.
[ArtDraw SVG Editor](https://artdraw.muisca.co/svg/app.html)

@sysmaya
Copy link
Author

sysmaya commented Mar 17, 2023

Hello.
I think I've fixed the rotate and resize issue.
With Click active the selector to Move, Resize, Rotate. But with the property transformOrigin=false.
so the resize operations are perfect.
When I select the object with such R key pressed. I create the selector but ONLY in Rotate mode and transformOrigin=true.

Translated to human. I create the selector of 2 different modes.

And the result is very satisfactory.
artdraw-svg-editor-online

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants