mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-26 18:31:29 +00:00
+ Fixed a bug in iQ where CSS of type -moz-transform wasn't getting set.
+ Made stacks a bit prettier.
This commit is contained in:
parent
e3c9d48e9a
commit
1bb64ef865
@ -833,10 +833,13 @@ window.Group.prototype = $.extend(new Item(), new Subscribable(), {
|
||||
// ----------
|
||||
_randRotate: function(spread, index){
|
||||
if( index >= this._stackAngles.length ){
|
||||
var randAngle = parseInt( ((Math.random()+.6)/1.3)*spread-(spread/2) );
|
||||
//var randAngle = parseInt( ((Math.random()+.6)/1.3)*spread-(spread/2) );
|
||||
var randAngle = 5*index + parseInt( (Math.random()-.5)*1 );
|
||||
this._stackAngles.push(randAngle);
|
||||
return randAngle;
|
||||
}
|
||||
|
||||
if( index > 5 ) index = 5;
|
||||
|
||||
return this._stackAngles[index];
|
||||
},
|
||||
|
@ -19,6 +19,7 @@
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Aza Raskin <aza@mozilla.com>
|
||||
*
|
||||
* Some portions copied from:
|
||||
* jQuery JavaScript Library v1.4.2
|
||||
@ -527,7 +528,12 @@ iQ.fn = iQ.prototype = {
|
||||
if(typeof(value) != 'string')
|
||||
value += 'px';
|
||||
}
|
||||
|
||||
|
||||
// -moz-transform is a special case. To set it doing elem.style["-moz-transform"]
|
||||
// doesn't work. You have to use elem.style["MozTransform"]. There are probably
|
||||
// other key values like this.
|
||||
// TODO: Generalize.
|
||||
if( key == "-moz-transform" ) key = "MozTransform";
|
||||
elem.style[key] = value;
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user