Refactoring and bugfixing

This commit is contained in:
barsdeveloper
2021-10-24 00:17:16 +02:00
parent a34be2351e
commit f80c9f8dc1
16 changed files with 274 additions and 1396 deletions

View File

@@ -5,19 +5,19 @@ export default class Template {
/**
* Computes the html content of the target element.
* @param {GraphNode} element Target element
* @param {Entity} entity Entity representing the element
* @returns The computed html
*/
render(element) {
render(entity) {
return ``
}
/**
* Returns the html elements rendered by this template.
* @param {GraphNode} element Target element
* @param {GraphNode} entity Entity representing the element
* @returns The rendered elements
*/
getElements(element) {
getElements(entity) {
let aDiv = document.createElement('div')
aDiv.innerHTML = this.render(element)
return aDiv.childNodes