#7 new
TooTallNate

Element#transform does not respect element's opacity in Internet Explorer

Reported by TooTallNate | January 29th, 2010 @ 08:01 PM

Element#transform is useful for rotation of an Element. Awesome! However, in IE, it uses the filter style. The problem is that Element#setOpacity (from Prototype) also uses the filter style in IE.

    var e = new Element("div").insert("this is text");
    e.setOpacity(0.5);
    // e will be 50% visible
    e.transform({
        rotation: Math.PI/2 //(90deg)
    });
    // e will be rotated 90 degrees to the right, but fully visible.
    e.setOpacity(0.5);
    // e will be rotated 90 degrees to the right, and be 50% visible.

So, basically Element#transform loses the opacity (alpha) filter value, but Element#setOpacity works as expected (and keeps the rotation value).

My recomendation is that Element#transform uses a RegExp check for the DXImageTransform.Microsoft.Matrix in the current filter and replaces it if necessary. This would be similar to the way that Element#setOpacity checks for the alpha value.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

http://github.com/madrobby/scripty2

People watching this ticket

Attachments

Pages