mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
PathStyle: small cleanup.
This commit is contained in:
parent
d7dca48e00
commit
13b8ddccc8
1 changed files with 4 additions and 2 deletions
|
@ -34,10 +34,10 @@ new function() {
|
|||
return style;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var pathStyleProps = { beans: true };
|
||||
var itemProps = { beans: true };
|
||||
|
||||
function addStyleBean(key) {
|
||||
pathStyleProps['set' + key.capitalize()] = function(value) {
|
||||
if(this.item && this.item.children) {
|
||||
|
@ -54,6 +54,7 @@ new function() {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
function addItemBean(key) {
|
||||
itemProps['set' + key.capitalize()] = function(value) {
|
||||
this.style[key] = value;
|
||||
|
@ -62,6 +63,7 @@ new function() {
|
|||
return this.style[key];
|
||||
};
|
||||
}
|
||||
|
||||
for (var i = 0, l = keys.length; i < l; i++) {
|
||||
var key = keys[i];
|
||||
addStyleBean(key);
|
||||
|
|
Loading…
Reference in a new issue