mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-21 14:24:47 +08:00
Move style related actions to templates
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user