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

Is it possible to have rotate feature? #1

Open
mgorabbani opened this issue Apr 16, 2019 · 6 comments
Open

Is it possible to have rotate feature? #1

mgorabbani opened this issue Apr 16, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@mgorabbani
Copy link

I am looking for a way to have to zoom in out feature as well as rotate feature. but all the library i see doesn't have rotate feature. Can you please guide me an way to add this?

@mnogueron
Copy link
Owner

@mgorabbani In order to support rotation in PanZoom there are some internal modifications to make.
I will try to evaluate how much change it needs to work, but that's a feature I would definitely like to add.

To make it work I basically need to rewrite all my scaling / panning calculation with a transformation matrix (see http://angrytools.com/css-generator/transform/)

@mnogueron
Copy link
Owner

@mgorabbani I have implemented a PoC in master that supports rotation.
It is only available through the rotate function using refs and not yet available with touch control.

There is one small issue that makes the whole screen flicker when you rotate to +/-180deg, I will try to fix it and release a new version with the rotation feature.

@mgorabbani
Copy link
Author

wow! that's cool!

@mnogueron
Copy link
Owner

It's suffering some heavy performance degradation that I will have to deal with before releasing a new version. So make sure you don't use the latest code on master for production release.

@mnogueron mnogueron self-assigned this Apr 18, 2019
@mnogueron mnogueron added the enhancement New feature or request label Apr 18, 2019
@mgorabbani
Copy link
Author

Oh okay no problem.

@mnogueron
Copy link
Owner

mnogueron commented May 2, 2019

@mgorabbani I've just released v0.2.5 that supports rotation through the rotate method.

I am still struggling when passing from 180 to 181deg or -180 to -181deg, with some flickery transitions, but the overall performance issue has been fixed and should run smoothly from now on.

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

No branches or pull requests

2 participants