mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-22 23:04:44 +08:00
Organizing input actions in device folders
This commit is contained in:
25
js/input/mouse/Select.js
Executable file
25
js/input/mouse/Select.js
Executable file
@@ -0,0 +1,25 @@
|
||||
import MouseClickDrag from "./MouseClickDrag"
|
||||
|
||||
export default class Select extends MouseClickDrag {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
super(target, blueprint, options)
|
||||
this.selectorElement = this.blueprint.selectorElement
|
||||
}
|
||||
|
||||
startDrag() {
|
||||
this.selectorElement.startSelecting(this.clickedPosition)
|
||||
}
|
||||
|
||||
dragTo(location, movement) {
|
||||
this.selectorElement.doSelecting(location)
|
||||
}
|
||||
|
||||
endDrag() {
|
||||
if (this.started) {
|
||||
this.selectorElement.finishSelecting()
|
||||
} else {
|
||||
this.blueprint.unselectAll()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user