wavedrom/wavedrom.github.io

Issue of exporting SVG

Talendu opened this issue · 2 comments

When i open the SVG file witch has been exported by wavedrom with Visio, I can't cancel combination correctly. So i check the SVG file, it's missing a before the . Following code showing the end of SVG file.

...
    </defs>
    <g id="waves_0">
        <g id="lanes_0" transform="translate(40.5, 0.5)">
            <g id="gmarks_0">
                <g style="stroke:#888;stroke-width:0.5;stroke-dasharray:1,3">
                <line id="gmark_0_0" x1="0" y1="0" x2="0" y2="30"/>
                </g>
            </g>
            <g id="wavelane_0_0" transform="translate(0,5)">
                <text x="-10" y="15" class="info" text-anchor="end" xml:space="preserve">
                    <tspan>clk
                    </tspan>
                </text>
                <g id="wavelane_draw_0_0" transform="translate(0, 0)"/>
            </g>
            <g id="wavearcs_0"/>
                <g id="wavegaps_0">
                    <g id="wavegap_0_0" transform="translate(0,5)"/>
                </g>
            </g>
            <g id="groups_0">
                <g/>
            </g>
        </g>
</svg>

On Waredrom Version 2.3.2

drom commented

I think you missed with your <g id="wavearcs_0"/> formatting. Here is correct formatting.

<svg>
...
    <g id="waves_0">
        <g id="lanes_0" transform="translate(40.5, 0.5)">
            <g id="gmarks_0">
                <g style="stroke:#888;stroke-width:0.5;stroke-dasharray:1,3">
                <line id="gmark_0_0" x1="0" y1="0" x2="0" y2="30"/>
                </g>
            </g>
            <g id="wavelane_0_0" transform="translate(0,5)">
                <text x="-10" y="15" class="info" text-anchor="end" xml:space="preserve">
                    <tspan>clk
                    </tspan>
                </text>
                <g id="wavelane_draw_0_0" transform="translate(0, 0)"/>
            </g>
            <g id="wavearcs_0"/>
            <g id="wavegaps_0">
                <g id="wavegap_0_0" transform="translate(0,5)"/>
            </g>
        </g>
        <g id="groups_0">
            <g/>
        </g>
    </g>
</svg>
drom commented

One thing, I should remove empty groups.