Avoid calling #moveTo() twice in SVG 'zm' path data sequence.

This commit is contained in:
Jürg Lehni 2014-03-16 22:44:46 +01:00
parent db1d87b843
commit 2a08a88461

View file

@ -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':