mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-23 07:14:42 +08:00
Group objects drag implemented
This commit is contained in:
@@ -33,7 +33,7 @@ export default class UDrag extends UMouseClickDrag {
|
||||
return
|
||||
}
|
||||
|
||||
this.target.addLocation(d)
|
||||
this.target.dragDispatch(d)
|
||||
|
||||
// Reassign the position of mouse
|
||||
this.mousePosition = mousePosition
|
||||
|
||||
@@ -8,6 +8,7 @@ export default class UMouseClickDrag extends UPointing {
|
||||
super(target, blueprint, options)
|
||||
this.clickButton = options?.clickButton ?? 0
|
||||
this.exitAnyButton = options?.exitAnyButton ?? true
|
||||
this.moveEverywhere = options?.moveEverywhere ?? false
|
||||
this.looseTarget = options?.looseTarget ?? false
|
||||
this.started = false
|
||||
this.clickedPosition = [0, 0]
|
||||
|
||||
@@ -7,7 +7,6 @@ export default class UPointing {
|
||||
this.target = target
|
||||
/** @type {import("../UEBlueprint").default}" */
|
||||
this.blueprint = blueprint
|
||||
this.moveEverywhere = options?.moveEverywhere ?? false
|
||||
this.movementSpace = this.blueprint?.getGridDOMElement() ?? document.documentElement
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ export default class USelect extends UMouseClickDrag {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
super(target, blueprint, options)
|
||||
|
||||
this.blueprint = blueprint // blueprint is needed
|
||||
this.stepSize = options?.stepSize
|
||||
this.mousePosition = [0, 0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user