Group objects drag implemented

This commit is contained in:
barsdeveloper
2021-10-04 23:07:40 +02:00
parent 0563663dfc
commit 0bb3a1ca3e
9 changed files with 122 additions and 84 deletions

View File

@@ -1,6 +1,6 @@
import UEBlueprintDraggableObject from "./UEBlueprintDraggableObject"
import USelectableDraggableObject from "./USelectableDraggableObject"
export default class UEBlueprintObject extends UEBlueprintDraggableObject {
export default class UEBlueprintObject extends USelectableDraggableObject {
static classInputs = [/*
{
name: "Input Example",
@@ -64,7 +64,6 @@ export default class UEBlueprintObject extends UEBlueprintDraggableObject {
constructor() {
super()
this.selected = false
this.inputs = this.constructor.classInputs.map(value => {
return {
connected: null
@@ -90,22 +89,6 @@ export default class UEBlueprintObject extends UEBlueprintDraggableObject {
aDiv.innerHTML = this.render()
this.appendChild(aDiv.firstElementChild)
}
isSelected() {
return this.selected
}
setSelected(value = true) {
if (this.selected == value) {
return
}
this.selected = value
if (value) {
this.classList.add('ueb-selected')
} else {
this.classList.remove('ueb-selected')
}
}
}
customElements.define('u-object', UEBlueprintObject)