Switch to new simpler convention for control of beans creation in straps.js

This commit is contained in:
Jürg Lehni 2014-04-02 20:53:18 +02:00
parent 4d52867b4a
commit fa9786b344
12 changed files with 352 additions and 352 deletions
src/basic

View file

@ -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();
};
}, {}));