mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 21:18:35 +00:00
Bug 584699: quick fix to -moz-transform rendering bug
--HG-- extra : rebase_source : 89019c5a0acff884ab47f18b96503435c6a56e7e
This commit is contained in:
parent
e08b14a0b9
commit
fe7e48b482
@ -465,7 +465,7 @@ iQClass.prototype = {
|
||||
// ----------
|
||||
// Function: css
|
||||
// Sets or gets CSS properties on the receiver. When setting certain numerical properties,
|
||||
// will automatically add "px".
|
||||
// will automatically add "px". A property can be removed by setting it to null.
|
||||
//
|
||||
// Possible call patterns:
|
||||
// a: object, b: undefined - sets with properties from a
|
||||
@ -508,7 +508,9 @@ iQClass.prototype = {
|
||||
if (pixels[key] && typeof(value) != 'string')
|
||||
value += 'px';
|
||||
|
||||
if (key.indexOf('-') != -1)
|
||||
if (value == null) {
|
||||
elem.style.removeProperty(key);
|
||||
} else if (key.indexOf('-') != -1)
|
||||
elem.style.setProperty(key, value, '');
|
||||
else
|
||||
elem.style[key] = value;
|
||||
|
@ -306,7 +306,7 @@ window.Item.prototype = {
|
||||
// Function: setRotation
|
||||
// Rotates the object to the given number of degrees.
|
||||
setRotation: function(degrees) {
|
||||
var value = "rotate(%deg)".replace(/%/, degrees);
|
||||
var value = degrees ? "rotate(%deg)".replace(/%/, degrees) : null;
|
||||
iQ(this.container).css({"-moz-transform": value});
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user