Wenn ich im Code:
Code: Alles auswählen
<svg xmlns="http://www.w3.org/2000/svg"
version=1.1"
<svg viewbox="-30 0 {{grafik.h_breite}} {{grafik.h_hoehe}}">
<defs>
<g id="wuerfelchen" style="stroke: black; stroke-width: 1; fill-opacity: 0.7;">
<polygon points="0,26 20,26, 20,6, 0,6" style="fill: yellow;"/>
<polygon points="0,6 20,6 26,0 6,0" style="fill: blue;"/>
<polygon points="20,26 26,20 26,0 20,6" style="fill: red;"/>
</g>
</defs>
{% if grafik.object == "raum" %}
{% for x, y in grafik.schieb %}
<use href="#wuerfelchen" transform="translate({{x}},{{y}})"/>
{% endfor %}
{% endif %}
</svg>
Auch wenn ich die unteren Zeilen ("...if grafik.object=="raum"..." weglasse, wird das Würfelchen angezeigt.