From 87f146fb44d9c1a2be21e3eebe3d92ac7a6637ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 14 Feb 2011 01:17:43 +0000 Subject: [PATCH] Have Item#setPosition use Point.read() for point conversion. --- src/item/Item.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/item/Item.js b/src/item/Item.js index 22cda9e5..abff36b0 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -394,6 +394,8 @@ Item = Base.extend({ setBounds: function(rect) { var bounds = this.bounds; rect = Rectangle.read(arguments); + if (!rect) + return; var matrix = new Matrix(); // Read this from bottom to top: // Translate to new center: @@ -434,7 +436,10 @@ Item = Base.extend({ }, setPosition: function(point) { - this.translate(point.subtract(this.position)); + point = Point.read(arguments); + if (point) { + this.translate(point.subtract(this.position)); + } }, /**