mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:41:34 +08:00
Graph link work in progress
This commit is contained in:
@@ -16,6 +16,7 @@ export default class Context {
|
||||
}
|
||||
|
||||
unlistenDOMElement() {
|
||||
this.blueprintUnfocused()
|
||||
this.blueprint.removeEventListener("blueprintfocus", this.blueprintfocusHandler)
|
||||
this.blueprint.removeEventListener("blueprintunfocus", this.blueprintunfocusHandler)
|
||||
}
|
||||
|
||||
@@ -4,11 +4,15 @@ export default class DragLink extends MouseClickDrag {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
super(target, blueprint, options)
|
||||
/** @type {import("../graph/GraphPin").default} */
|
||||
this.target
|
||||
/** @type {import("../graph/GraphLink").default} */
|
||||
this.link
|
||||
}
|
||||
|
||||
startDrag() {
|
||||
let a = 12
|
||||
console.log(a)
|
||||
let link = this.target.dragLink()
|
||||
|
||||
}
|
||||
|
||||
dragTo(location, movement) {
|
||||
|
||||
@@ -16,6 +16,6 @@ export default class KeyvoardCanc extends KeyboardShortcut {
|
||||
}
|
||||
|
||||
fire() {
|
||||
this.blueprint.deleteNode(...this.blueprint.getNodes(true))
|
||||
this.blueprint.removeGraphElement(...this.blueprint.getNodes(true))
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ export default class Paste extends Context {
|
||||
this.blueprint.unselectAll()
|
||||
}
|
||||
let mousePosition = this.blueprint.entity.mousePosition
|
||||
this.blueprint.addNode(...nodes)
|
||||
this.blueprint.addGraphElement(...nodes)
|
||||
nodes.forEach(node => {
|
||||
const locationOffset = [
|
||||
mousePosition[0] - left,
|
||||
|
||||
Reference in New Issue
Block a user