diff options
Diffstat (limited to 'app/svg.js')
| -rw-r--r-- | app/svg.js | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -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); - } - } } |
