Skip to content

Commit 356134b

Browse files
committed
Fixes multiple successive close patchs
1 parent 99e876d commit 356134b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/com/mxgraph/svg2xml/mxPathParser.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ else if (prevPathType == 'M')
100100
break;
101101
case 'z':
102102
case 'Z':
103-
closePath();
103+
if (Character.toLowerCase(prevPathType) != 'z')
104+
{
105+
closePath();
106+
}
104107
break;
105108
case 'm':
106109
movetoRel(currPathString);
@@ -168,6 +171,8 @@ else if (prevPathType == 'M')
168171
{
169172
svgPath = svgPath.substring(nextPartStartIndex, svgPath.length());
170173
}
174+
175+
prevPathType = currPathType;
171176
}
172177
while (svgPath.length() > 0);
173178

0 commit comments

Comments
 (0)