SVG: Correctly handle multiple sequential move commands.

Closes #1134
This commit is contained in:
Jürg Lehni 2016-08-07 21:36:03 +02:00
parent 7a63afc769
commit cecd95e039

View file

@ -171,12 +171,14 @@ var PathItem = Item.extend(/** @lends PathItem# */{
case 'm':
case 'l':
var move = lower === 'm';
for (var j = 0; j < length; j += 2)
this[!j && move ? 'moveTo' : 'lineTo'](
current = getPoint(j));
for (var j = 0; j < length; j += 2) {
this[move ? 'moveTo' : 'lineTo'](current = getPoint(j));
if (move) {
start = current;
move = false;
}
}
control = current;
if (move)
start = current;
break;
case 'h':
case 'v':