+ 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:
Aza Raskin 2010-05-27 19:17:01 -07:00
parent e3c9d48e9a
commit 1bb64ef865
2 changed files with 11 additions and 2 deletions

View File

@ -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];
},

View File

@ -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;
});
}