Simplify PathStyle#initialize().

This commit is contained in:
Jürg Lehni 2011-05-16 19:20:32 +01:00
parent 34110fa82d
commit 05c0eb0e51

View file

@ -29,15 +29,13 @@ var PathStyle = this.PathStyle = Base.extend(new function() {
beans: true, beans: true,
initialize: function(style) { initialize: function(style) {
if (style) { // Note: This relies on bean setters that get implicetly
// Note: This relies on bean setters that get implicetly // called when setting values on this[key].
// called when setting values on this[key]. for (var i = 0, l = style && keys.length; i < l; i++) {
for (var i = 0, l = keys.length; i < l; i++) { var key = keys[i],
var key = keys[i], value = style[key];
value = style[key]; if (value !== undefined)
if (value !== undefined) this[key] = value;
this[key] = value;
}
} }
}, },