From 890eda9197f10ea7adfdbb8ab1e45cb3167e3321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= Date: Wed, 15 Jan 2014 18:04:51 +0100 Subject: [PATCH 1/3] Fix typo in comment --- src/item/Item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item/Item.js b/src/item/Item.js index 2611d466..bd71a13a 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -1992,7 +1992,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{ /** * Inserts this item below the specified item. * - * @param {Item} item the item above which it should be inserted + * @param {Item} item the item below which it should be inserted * @return {Item} the inserted item, or {@code null} if inserting was not * possible. */ From ac2161c6d926aabe97739d6316bb90d46ac69085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 2 Mar 2014 01:02:33 +0100 Subject: [PATCH 2/3] Fix importPoly() on Node.js Closes #390 --- src/svg/SVGImport.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/svg/SVGImport.js b/src/svg/SVGImport.js index fb7a84be..03c5b32e 100644 --- a/src/svg/SVGImport.js +++ b/src/svg/SVGImport.js @@ -116,11 +116,14 @@ new function() { } function importPoly(node, type) { - var path = new Path(), - points = node.points; - path.moveTo(points.getItem(0)); - for (var i = 1, l = points.numberOfItems; i < l; i++) - path.lineTo(points.getItem(i)); + var coords = node.getAttribute('points').match( + /[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g), + points = []; + for (var i = 0, l = coords.length; i < l; i += 2) + points.push(new Point( + parseFloat(coords[i]), + parseFloat(coords[i + 1]))); + var path = new Path(points); if (type === 'polygon') path.closePath(); return path; From 2f61d11a3bffc42c41472b255b22f3d516a979c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 2 Mar 2014 01:07:13 +0100 Subject: [PATCH 3/3] Prevent accidental transformation of selection bounds in TextItem. Closes #386. --- src/text/TextItem.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/text/TextItem.js b/src/text/TextItem.js index 55ed163a..ab3a1ba3 100644 --- a/src/text/TextItem.js +++ b/src/text/TextItem.js @@ -24,6 +24,7 @@ var TextItem = Item.extend(/** @lends TextItem# */{ _class: 'TextItem', _boundsSelected: true, + _transformContent: false, _serializeFields: { content: null },