From 03561f762f599bef4a20ee11bd73012b2f6920a1 Mon Sep 17 00:00:00 2001 From: kangax Date: Tue, 1 Mar 2011 19:06:27 -0500 Subject: [PATCH] Add "rx", "ry" to the stateProperties of fabric.Rect. Fixes issue #16. --- src/rect.class.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/rect.class.js b/src/rect.class.js index f120bd9e..476d169c 100644 --- a/src/rect.class.js +++ b/src/rect.class.js @@ -39,10 +39,21 @@ * @return {Object} thisArg */ initialize: function(options) { + this._initStateProperties(); this.callSuper('initialize', options); this._initRxRy(); }, + /** + * Creates `stateProperties` list on an instance, and adds `fabric.Rect` -specific ones to it + * (such as "rx", "ry", etc.) + * @private + * @method _initStateProperties + */ + _initStateProperties: function() { + this.stateProperties = this.stateProperties.concat(['rx', 'ry']); + }, + /** * @private * @method _initRxRy