Commit 7a54bce7 authored by Christian Winter's avatar Christian Winter

bugfix. exported svg moved instance lines two times

parent 4ad6123b
Pipeline #4767410 passed with stage
in 1 minute and 5 seconds
......@@ -166,7 +166,6 @@ class Exporter {
let instances = kv[1];
for (let instance of instances) {
text += indent;
text += "<g prefabReferenceID='" + prefab.id + "'";
text += " positionX='" + instance.transform.position.x + "'";
......@@ -177,14 +176,13 @@ class Exporter {
text += "> \n";
for (let line of prefab.lines) {
line = line.copy().move(instance.transform.position);
text +=
indent + "\t" +
'<line ' +
'x1="' + line.start.position.x + '" ' +
'y1="' + line.start.position.y + '" ' +
'x2="' + line.end.position.x + '" ' +
'y2="' + line.end.position.y + '" ' +
'x1="' + instance.instanceSpaceForPosition(line.start.position).x + '" ' +
'y1="' + instance.instanceSpaceForPosition(line.start.position).y + '" ' +
'x2="' + instance.instanceSpaceForPosition(line.end.position).x + '" ' +
'y2="' + instance.instanceSpaceForPosition(line.end.position).y + '" ' +
'stroke="' + line.color.toHexString() + '" ' +
'stroke-opacity="' + (line.color.a) + '" ' +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment