Move style related actions to templates

This commit is contained in:
barsdeveloper
2021-12-10 21:05:44 +01:00
parent 7bc0f4e2f2
commit 6b02ab7e08
19 changed files with 2693 additions and 139 deletions

View File

@@ -1,4 +1,5 @@
import GraphElement from "./GraphElement"
import LinkTemplate from "../template/LinkTemplate"
export default class GraphLink extends GraphElement {
@@ -12,18 +13,10 @@ export default class GraphLink extends GraphElement {
* @param {?PinReference} destination
*/
constructor(source, destination) {
super()
super(this, new LinkTemplate())
this.source = source
this.destination = destination
}
render() {
return `
<svg viewBox="0 0 100 100">
<line x1="0" y1="80" x2="100" y2="20" stroke="black" />
</svg>
`
}
}
customElements.define("u-link", GraphLink)