From 2a08a88461ed8a288be0438d48c52e0558e67e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 16 Mar 2014 22:44:46 +0100 Subject: [PATCH] Avoid calling #moveTo() twice in SVG 'zm' path data sequence. --- src/path/PathItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/path/PathItem.js b/src/path/PathItem.js index d5251603..f274247a 100644 --- a/src/path/PathItem.js +++ b/src/path/PathItem.js @@ -220,7 +220,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{ coords = part.match(/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g); var length = coords && coords.length; relative = command === lower; - if (previous === 'z' && lower !== 'z') + if (previous === 'z' && !/[mz]/.test(lower)) this.moveTo(current = start); switch (lower) { case 'm':