Skip to content

Commit a487576

Browse files
committed
fixes #71
1 parent 39e40df commit a487576

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/app/scripts/commands/PathParser.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,13 @@ export function parseCommands(
285285
});
286286

287287
for (let i = 0; i < bezierCoords.length; i += 8) {
288+
const endPoint = new Point(bezierCoords[i + 6], bezierCoords[i + 7]);
288289
commands.push(newBezierCurve(
289290
currentPoint,
290291
new Point(bezierCoords[i + 2], bezierCoords[i + 3]),
291292
new Point(bezierCoords[i + 4], bezierCoords[i + 5]),
292-
new Point(bezierCoords[i + 6], bezierCoords[i + 7])));
293+
endPoint));
294+
currentPoint = endPoint;
293295
}
294296

295297
currentControlPoint = undefined;

src/app/scripts/import/SvgLoader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ export function loadVectorLayerFromSvgString(svgString: string): VectorLayer {
162162
cy = lengthPxFn(node.cy),
163163
rx = lengthPxFn(node.rx),
164164
ry = lengthPxFn(node.ry);
165-
path = `M ${cx},${cy - ry} A ${rx} ${ry} 0 1 0 ${cx},${cy + ry} ` +
166-
`A ${rx} ${ry} 0 1 0 ${cx},${cy - ry} Z`;
165+
path = `M ${cx},${cy - ry} A ${rx} ${ry} 0 1 0 ${cx},${cy + ry} `
166+
+ `A ${rx} ${ry} 0 1 0 ${cx},${cy - ry} Z`;
167167
}
168168

169169
if (path) {

0 commit comments

Comments
 (0)