Refactoring

This commit is contained in:
barsdeveloper
2021-10-31 16:05:38 +01:00
parent 12e44c5482
commit 199005ec20
13 changed files with 1297 additions and 81 deletions

18
js/graph/GraphElement.js Executable file
View File

@@ -0,0 +1,18 @@
export default class GraphElement extends HTMLElement {
/**
*
* @param {import("../template/Template").default} template The template to render this node
*/
constructor(entity, template) {
super()
/** @type {import("../Blueprint").default}" */
this.blueprint = null
this.entity = entity
this.template = template
}
connectedCallback() {
this.blueprint = this.closest('u-blueprint')
this.append(...this.template.getElements(this.entity))
}
}