mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-27 10:44:43 +08:00
Group objects drag implemented
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user