Graph link work in progress

This commit is contained in:
barsdeveloper
2021-12-22 22:24:13 +01:00
parent 93acfb5d33
commit 352f235610
14 changed files with 399 additions and 159 deletions

View File

@@ -1,6 +1,7 @@
import GraphElement from "./GraphElement"
import PinTemplate from "../template/PinTemplate"
import DragLink from "../input/DragLink"
import GraphLink from "./GraphLink"
export default class GraphPin extends GraphElement {
@@ -46,6 +47,23 @@ export default class GraphPin extends GraphElement {
getType() {
return this.entity.getType()
}
/**
*
* @returns {GraphLink} The link created
*/
dragLink() {
let link = new GraphLink(this)
return link
}
/**
* Returns The exact location where the link originates from or arrives at.
* @returns {Number[]} The location array
*/
getLinkLocation() {
return [0, 0];
}
}
customElements.define("ueb-pin", GraphPin)