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

Original transform setting is overwritten. #93

Open
GoogleCodeExporter opened this issue Apr 21, 2015 · 11 comments
Open

Original transform setting is overwritten. #93

GoogleCodeExporter opened this issue Apr 21, 2015 · 11 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.Create an image with a transform setting.
2.Apply .rotate() to the image.
3.

What is the expected output? What do you see instead?
The expected output should have multiple transforms, the original plus the
added transform from the rotate.

Instead, the original is lost.

What version of the product are you using? On what operating system?
jQueryRotate.2.2
Mozilla Firefox 14.0.1

Please provide any additional information below.

-html tag for image before rotation.
<img style=..."-moz-transform: rotate(175deg);"

-html tag for image after rotation.
<img style=..."-moz-transform: translate(605px, 295px);"



Original issue reported on code.google.com by Krb...@gmail.com on 5 Feb 2013 at 9:31

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

EDIT: the two html tags at the bottom are out of order.

Because of this issue, I cannot properly display objects on my mapping program 
because their markers are pre-transformed.  

Your code fix is quite easy, really. On line 273, change

this._img.style[supportedCSS]="rotate("+(angle%360)+"deg)";

and make it += 

Original comment by Krb...@gmail.com on 5 Feb 2013 at 9:39

@GoogleCodeExporter
Copy link
Author

Is it working for you with += on CSS supported browsers? (Safari/chrome)? If 
yes then i'm happy to integrate that into main code

Original comment by wil...@gmail.com on 5 Feb 2013 at 10:21

@GoogleCodeExporter
Copy link
Author

Verified that it is fixed for Firefox and Chrome, but not sure about safari.  I 
will see if I can whip up a sample on jsfiddle

Original comment by Krb...@gmail.com on 5 Feb 2013 at 10:31

@GoogleCodeExporter
Copy link
Author

[deleted comment]

3 similar comments
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

The error is here:

http://jsfiddle.net/krb686/7kV5P/14/

the fix is here:

http://jsfiddle.net/krb686/QSwtv/7/

Original comment by Krb...@gmail.com on 5 Feb 2013 at 11:40

@GoogleCodeExporter
Copy link
Author

In chrome fix you're proposing completly breaks the plugin - instead of 
rotating "20" angle every tick it starts to adds one rotation to another. Guess 
need better way of summing transforms :/

Original comment by wil...@gmail.com on 30 Jun 2013 at 8:32

@GoogleCodeExporter
Copy link
Author

For your case I would suggest instead of using translate, just use a simple 
position absolute, and set left, top to a transform values - effect should be 
the same, however problem is still viable. Detecting and mixing transform 
properties might be expensive on a computation level so I still got many doubts 
about doing that :/

Original comment by wil...@gmail.com on 12 Jul 2013 at 6:54

  • Changed state: Accepted

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

No branches or pull requests

1 participant