Blueprint focusable

This commit is contained in:
barsdeveloper
2021-11-06 20:59:00 +01:00
parent ceb07688f2
commit afa27bf42c
13 changed files with 318 additions and 79 deletions

View File

@@ -17,7 +17,7 @@ export default class SelectableDraggable extends GraphElement {
connectedCallback() {
super.connectedCallback()
this.dragObject = new Drag(this, null, { // UDrag doesn't need blueprint
this.dragObject = new Drag(this, this.blueprint, { // UDrag doesn't need blueprint
looseTarget: true
})
}
@@ -36,7 +36,7 @@ export default class SelectableDraggable extends GraphElement {
this.setLocation([this.location[0] + value[0], this.location[1] + value[1]])
}
dragDispatch(value) {
dispatchDragEvent(value) {
if (!this.selected) {
this.blueprint.unselectAll()
this.setSelected(true)