mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-13 23:37:30 +08:00
Various fixes
This commit is contained in:
58
js/graph/GraphLink.js
Normal file → Executable file
58
js/graph/GraphLink.js
Normal file → Executable file
@@ -1,29 +1,29 @@
|
||||
import UBlueprintEntity from "./UBlueprintEntity"
|
||||
|
||||
export default class GraphLink 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', GraphLink)
|
||||
import UBlueprintEntity from "./UBlueprintEntity"
|
||||
|
||||
export default class GraphLink 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', GraphLink)
|
||||
|
||||
Reference in New Issue
Block a user