mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-27 06:10:14 -04:00
Switch to new simpler convention for control of beans creation in straps.js
This commit is contained in:
parent
4d52867b4a
commit
fa9786b344
12 changed files with 352 additions and 352 deletions
src/basic
|
@ -716,17 +716,15 @@ var Matrix = Base.extend(/** @lends Matrix# */{
|
|||
applyToContext: function(ctx) {
|
||||
ctx.transform(this._a, this._c, this._b, this._d, this._tx, this._ty);
|
||||
}
|
||||
}, new function() {
|
||||
}, Base.each(['a', 'c', 'b', 'd', 'tx', 'ty'], function(name) {
|
||||
// Create getters and setters for all internal attributes.
|
||||
return Base.each(['a', 'c', 'b', 'd', 'tx', 'ty'], function(name) {
|
||||
var part = Base.capitalize(name),
|
||||
prop = '_' + name;
|
||||
this['get' + part] = function() {
|
||||
return this[prop];
|
||||
};
|
||||
this['set' + part] = function(value) {
|
||||
this[prop] = value;
|
||||
this._changed();
|
||||
};
|
||||
}, {});
|
||||
});
|
||||
var part = Base.capitalize(name),
|
||||
prop = '_' + name;
|
||||
this['get' + part] = function() {
|
||||
return this[prop];
|
||||
};
|
||||
this['set' + part] = function(value) {
|
||||
this[prop] = value;
|
||||
this._changed();
|
||||
};
|
||||
}, {}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue