diff --git a/svelte-app/src/lib/export.ts b/svelte-app/src/lib/export.ts index 27bfae8..4201644 100644 --- a/svelte-app/src/lib/export.ts +++ b/svelte-app/src/lib/export.ts @@ -322,20 +322,8 @@ async function buildSvgString(): Promise { lines.push(` `); lines.push(` ${innerContent}`); lines.push(' '); - } else if (children.length === 1) { - // Single element, no group — put id/label/transform directly on it - const el = children[0].cloneNode(true) as Element; - const elTransform = el.getAttribute('transform'); - el.setAttribute('transform', elTransform ? `${baseTransform} ${elTransform}` : baseTransform); - el.setAttribute('id', label); - let s = new XMLSerializer().serializeToString(el) - .replace(/ xmlns="http:\/\/www\.w3\.org\/2000\/svg"/g, ''); - // Inject inkscape:label after the tag name - const firstSpace = s.indexOf(' '); - s = s.slice(0, firstSpace) + ` inkscape:label="${label}"` + s.slice(firstSpace); - lines.push(` ${s}`); } else { - // Multiple children without a group — wrap in with id/label + // Always wrap in so every symbol gets Ignition metadata (tagpaths, color, state, priority) const innerContent = serializeChildren(svgEl); lines.push(` `); lines.push(` ${innerContent}`);