mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Simplify PathStyle#initialize().
This commit is contained in:
parent
34110fa82d
commit
05c0eb0e51
1 changed files with 7 additions and 9 deletions
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue