mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-15 09:44:49 +08:00
Naming
This commit is contained in:
26
js/input/Select.js
Normal file
26
js/input/Select.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import MouseClickDrag from "./MouseClickDrag"
|
||||
|
||||
export default class Select extends MouseClickDrag {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
super(target, blueprint, options)
|
||||
this.stepSize = options?.stepSize
|
||||
this.mousePosition = [0, 0]
|
||||
}
|
||||
|
||||
startDrag() {
|
||||
this.blueprint.startSelecting(this.clickedPosition)
|
||||
}
|
||||
|
||||
dragTo(location, movement) {
|
||||
this.blueprint.doSelecting(location)
|
||||
}
|
||||
|
||||
endDrag() {
|
||||
if (this.started) {
|
||||
this.blueprint.finishSelecting()
|
||||
} else {
|
||||
this.blueprint.unselectAll()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user