From 13b8ddccc863e64fc2b682e14a328160dba9c2e8 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Wed, 16 Feb 2011 22:15:19 +0100 Subject: [PATCH] PathStyle: small cleanup. --- src/item/PathStyle.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/item/PathStyle.js b/src/item/PathStyle.js index 57e8c28c..ce55bdde 100644 --- a/src/item/PathStyle.js +++ b/src/item/PathStyle.js @@ -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);