aboutsummaryrefslogtreecommitdiffstats
path: root/app/svg.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/svg.js')
-rw-r--r--app/svg.js12
1 files changed, 1 insertions, 11 deletions
diff --git a/app/svg.js b/app/svg.js
index 24f6a3d..84d3aa6 100644
--- a/app/svg.js
+++ b/app/svg.js
@@ -127,7 +127,7 @@ export class Svg {
static path(lineString, options = new SvgOptions()) {
const element = document.createElementNS("http://www.w3.org/2000/svg", "path");
element.setAttribute("d", Svg.getPath(lineString.coordinates));
- for (const [key, value] of Object.entries({ fill: "none", ...options.attributes })) {
+ for (const [key, value] of Object.entries(options.attributes)) {
element.setAttribute(key, value);
}
Object.assign(element.style, options.styles);
@@ -284,14 +284,4 @@ export class Svg {
element.append(...options.children.filter(Boolean));
return element;
}
-
- /**
- * Clear all children from an element
- * @param {SVGElement} element
- */
- static clear(element) {
- while (element.firstChild) {
- element.removeChild(element.firstChild);
- }
- }
}