mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-06 23:57:30 +08:00
Naming
This commit is contained in:
29
js/Link.js
Normal file
29
js/Link.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import UBlueprintEntity from "./UBlueprintEntity"
|
||||
|
||||
export default class Link extends UBlueprintEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
* @typedef {{
|
||||
* node: String,
|
||||
* pin: String
|
||||
* }} PinReference
|
||||
* @param {?PinReference} source
|
||||
* @param {?PinReference} destination
|
||||
*/
|
||||
constructor(source, destination) {
|
||||
super()
|
||||
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', Link)
|
||||
Reference in New Issue
Block a user