diff --git a/src/rect.class.js b/src/rect.class.js index 763d20e1..6f680421 100644 --- a/src/rect.class.js +++ b/src/rect.class.js @@ -206,11 +206,11 @@ * Since coordinate system differs from that of SVG */ _normalizeLeftTopProperties: function(parsedAttributes) { - if (parsedAttributes.left) { + if ('left' in parsedAttributes) { this.set('left', parsedAttributes.left + this.getWidth() / 2); } this.set('x', parsedAttributes.left || 0); - if (parsedAttributes.top) { + if ('top' in parsedAttributes) { this.set('top', parsedAttributes.top + this.getHeight() / 2); } this.set('y', parsedAttributes.top || 0);