feat(svelte): add BaseEdge and EdgeLabelRenderer

This commit is contained in:
moklick
2023-02-23 18:21:39 +01:00
parent bb528e6798
commit 1dd5613482
15 changed files with 225 additions and 122 deletions
@@ -0,0 +1,15 @@
export default function (node: Element, target = 'body') {
const targetEl = document.querySelector(target);
if (targetEl) {
targetEl.appendChild(node);
}
return {
destroy() {
if (node.parentNode) {
node.parentNode.removeChild(node);
}
}
};
}