Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
<use href="#rectsel_path" stroke-width="1.0 "stroke="purple"/>
<use href="#rectsel_path" stroke-width="0.5" stroke="#fcf" />
<defs id ="static_defs">
- <g id="rectsel_path"><path stroke-dasharray="1 1" d=""/></g>
+ <g id="rectsel_path"><path fill="none" stroke-dasharray="1 1" d=""/></g>
</defs>
</svg>
{% endmacro space %}
if (pos2 == null) {
path = "";
} else {
- path = "M";
- for (let p of [rectsel_start!, pos2]) {
- for (let i of [0,1]) {
- path += ` ${ p[i] }`;
- }
- }
+ path = `M ${ rectsel_start! [0]} ${ rectsel_start! [1] }
+ ${ pos2 [0]} ${ rectsel_start! [1] }
+ ${ pos2 [0]} ${ pos2 [1] }
+ ${ rectsel_start! [0]} ${ pos2 [1] } Z`;
}
rectsel_path.firstElementChild!.setAttributeNS(null,'d',path);
}