Avoid double lookup of component key.

This commit is contained in:
Jonathan Puckey 2011-05-21 17:49:54 +02:00
parent f3deed81cd
commit 81558cb54f

View file

@ -263,7 +263,8 @@ var Color = this.Color = Base.extend(new function() {
color[component] = value;
color = color.convert(this._colorType);
for (var i = 0, l = this._components.length; i < l; i++) {
this[this._components[i]] = color[this._components[i]];
var component = this._components[i];
this[component] = color[component];
}
};
});