mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
No need for an injection scope as we can also just use Base.each() in combination with a side-car.
This commit is contained in:
parent
b96cd4e1c8
commit
d9777111dc
1 changed files with 18 additions and 20 deletions
|
@ -293,10 +293,9 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
|
|||
statics: {
|
||||
_id: 0
|
||||
}
|
||||
}, new function() { // Injection scope to produce getter setters for properties
|
||||
// We need setters because we want to call _changed() if a property was
|
||||
// modified.
|
||||
return Base.each(['locked', 'visible', 'blendMode', 'opacity', 'guide'],
|
||||
}, Base.each(['locked', 'visible', 'blendMode', 'opacity', 'guide'],
|
||||
// Produce getter/setters for properties. We need setters because we want to
|
||||
// call _changed() if a property was modified.
|
||||
function(name) {
|
||||
var part = Base.capitalize(name),
|
||||
name = '_' + name;
|
||||
|
@ -311,8 +310,7 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
|
|||
? ChangeFlag.ATTRIBUTE : Change.ATTRIBUTE);
|
||||
}
|
||||
};
|
||||
}, {});
|
||||
}, /** @lends Item# */{
|
||||
}, {}), /** @lends Item# */{
|
||||
// Note: These properties have their getter / setters produced in the
|
||||
// injection scope above.
|
||||
|
||||
|
|
Loading…
Reference in a new issue