mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -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,
|
||||
|
||||
initialize: function(style) {
|
||||
if (style) {
|
||||
// Note: This relies on bean setters that get implicetly
|
||||
// called when setting values on this[key].
|
||||
for (var i = 0, l = keys.length; i < l; i++) {
|
||||
var key = keys[i],
|
||||
value = style[key];
|
||||
if (value !== undefined)
|
||||
this[key] = value;
|
||||
}
|
||||
// Note: This relies on bean setters that get implicetly
|
||||
// called when setting values on this[key].
|
||||
for (var i = 0, l = style && keys.length; i < l; i++) {
|
||||
var key = keys[i],
|
||||
value = style[key];
|
||||
if (value !== undefined)
|
||||
this[key] = value;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue