heygrady/transform — Issue #31: translation not working properly in IE8
Author: joni78
Created: 2011-11-24 20:45:49+00:00
State: open

Hi,

I am using your JQuery 2D transform plugin to rotate images as follows:

$("#crop_container img").transform(
{
translateX: translateX+'px',
translateY: translateY+'px',
rotate: rotation+'deg'
});

Where the crop_container is an absolutely positioned div wrapped around the image as you suggested in another issue. The translation is calculated on basis of the image orientation (portrait/landscape) and its rotation. For landscape and 90 or 270 degrees it is:

translate=(imagewidth-imageheight)/2;
translateX = '-'+translate;
translateY = translate;

All is good in FF/Webkit/IE9, but in IE8 it seems the translation is off. I read in a wiki page that "IE also lacks support for transform-origin and translate() [...] The jQuery Transform plug-in handles these calculations automatically". If this is true then I must be doing something wrong or there is a bug.

Any ideas/advice?

Thanks!