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 'm':
case 'l': case 'l':
var move = lower === 'm'; var move = lower === 'm';
for (var j = 0; j < length; j += 2) for (var j = 0; j < length; j += 2) {
this[!j && move ? 'moveTo' : 'lineTo']( this[move ? 'moveTo' : 'lineTo'](current = getPoint(j));
current = getPoint(j)); if (move) {
start = current;
move = false;
}
}
control = current; control = current;
if (move)
start = current;
break; break;
case 'h': case 'h':
case 'v': case 'v':