Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Scotty

IE8 and Rotation Transform Issue

Recommended Posts

HI there, 

 

I'm experiencing a bizarre issue with IE8 and the rotation transform code that GSAP is producing. I'm trying to narrow it down to either my bad code, IE8 or a possible bug in GSAP. It may be my code but that's why I'm asking here. :)

 

The problem is with the first rotation transform on an image. It's not keeping the image centered using the margin offset in the rendered code. Calling the rotation command a second time, however, inserts the correct margin centering code.

 

Take this line of code:

TweenMax.to( '#stairs-container-bottom', 0, { rotation: -30 } );

I'm seeing it render out this initially for IE8:

filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.86602, M12=0.49999, M21=-0.49999, M22=0.86602, sizingMethod='auto expand')  ; MARGIN: 0px; ZOOM: 1; DISPLAY: block

The problem I'm seeing is the margin is set to 0, causing the graphic to be offset from the center rotation point visually.

 

If I call the rotation command again, it renders out with the correct margin to keep the image centered:

filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.86602, M12=0.49999, M21=-0.49999, M22=0.86602, sizingMethod='auto expand') ; MARGIN: -31px 31px 31px -31px; ZOOM: 1; DISPLAY: block;

Has this been reported before? Is it something I'm doing?

 

I'm testing this in a VMWare image of Windows 7 with an IE8 install version 8.0.7601.1.17514

 

Thanks for any direction :)

Link to comment
Share on other sites

Hello Scotty, and Welcome to the GreenSock Forums!

 

Without seeing what your CSS looks like.. this could be a number of things that IE8 could be causing:

  • Is the element your rotating have the CSS property position:absolute or position:relative, so it takes the element out of the flow of the document?
  • For IE8 do you have the CSS property zoom:1 set in your stylesheet, to tell IE that the element hasLayout? (even though i do see GSAP add it to the style)
  • To get an exact render its best to test on real IE8 standalone, because I have seen even VMware with IE8, not render like real IE8 standalone on XP and Win7 on PC.
  • You could try using GSAP to set() the margin for the image so it can keep track of what or any changes happen.

If possible can you provide a codepen example so we can see your code in action.

 

Here is a video tut by GreenSock on How to create a codpen demo example.

 

NOTE:

If using IE8 to view in codepen, that you will need to view the example in codepen's Full View, because IE8 will not work in codepen Edit modes.

 

But once we see your code in context it will help us to see the behavior you describe

 

Thanks :)

Link to comment
Share on other sites

Hi,

 

Thanks for the reply. Got all the bullets you have and been there, done that, etc. And it's the same on a laptop I have with IE8 on it. VMWare has been pretty solid for this stuff in my experience.

 

This project is too big to put on codepen, plus it's not "live" yet so due to client-confidentiality, etc. etc. I don't want to post a public link to it, but I could send you a PM if you want to take a look at it.

 

I'm still going through and trying to narrow down what may be causing a conflict. I've gotten it to work in some scenarios so far.

Link to comment
Share on other sites

Please keep working on a reduced test case. Chances are the process of reducing and adding things in will make it clear where the conflict is.  Unfortunately we don't have the resources to dig through large projects. 

Link to comment
Share on other sites

Yep. I was just hoping to see if this was a known occurrence in IE8 with this transform. I haven't had any issues with GSAP in IE8 otherwise.

Link to comment
Share on other sites

I just tested it and it seems to be working just fine. Can't reproduce any problems, and nobody has reported anything similar (at least not that I can remember). That simplified codepen demo would be super helpful :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×