wilq32-pwitkowski / jqueryrotate

jQueryRotate - plugin to rotate images by any angle cross-browse with animation support
http://jqueryrotate.com
151 stars 58 forks source link

IE error on second rotation #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using jQueryRotate.2.1.js
In my code, I need to re-rotate a previously rotated image.

My javascript is like this:
img=$('#id_of_img_tag');
rotated_img=img.rotate(angle1)[0];
rotated_img.rotate(angle2);

This works fine in Chrome and Firefox, but in IE8 I get the following error:

Message: 'this._container.style' is null or not an object

Original issue reported on code.google.com by garretw...@gmail.com on 25 May 2011 at 10:18

GoogleCodeExporter commented 9 years ago
I chased it down more specifically:
It's only an issue if I attempt to do the second rotation immediately after the 
first, before it has finished loading. This may not be as much of a bug as a 
necessary feature.

Original comment by garretw...@gmail.com on 26 May 2011 at 4:02

GoogleCodeExporter commented 9 years ago
Maybe you have some test case? Some example web page somewhere on the web that 
I can look at ? thanks for feedback!

Original comment by wil...@gmail.com on 26 May 2011 at 8:13

GoogleCodeExporter commented 9 years ago
I don't have a test case to contribute but I ran into a similar issue.. I was 
getting a Script Failed error on that same line of code -- this._container was 
null.. BUT -- I only got this issue when using IE9, while pointing the "Browser 
Mode" and "Document Mode" to IE8 -- in real IE8, on the same computer, there 
was no error... Perhaps this is the case for garret?

Original comment by tmsim...@gmail.com on 5 Jul 2011 at 5:38

GoogleCodeExporter commented 9 years ago
Running IE9 in other browse mode sometimes end up in some strange browser mode 
that in fact does not emulate previous versions but does some strange things 
where code does not work as it should o_O

Were you able to retest this problem on normal IE browsers?

Original comment by wil...@gmail.com on 4 Aug 2011 at 3:04

GoogleCodeExporter commented 9 years ago
I had this problem to, a quick dirty fix is to remove the image and add it back 
in the callback function

Original comment by sfairbai...@gmail.com on 1 Sep 2011 at 11:45

GoogleCodeExporter commented 9 years ago
Well a problem is that after first rotation a image is replaced with a 
<VML:image> for IE. However if you still hold a reference to old object in code 
and try to rotate it then it will kind of complain about it.

In the example at the top I can see that rotated_img is reattached based on 
rotation. However rotate() object currently returns a ImageRotation object, not 
items itselft so maybe thats the problem. The best would be to have some Test 
Case so i can take a look (or live example)

Original comment by wil...@gmail.com on 1 Sep 2011 at 12:08

GoogleCodeExporter commented 9 years ago
It should be fixed with new version of plugin

Original comment by wil...@gmail.com on 13 Mar 2012 at 10:51