Improove naming input options

This commit is contained in:
barsdeveloper
2022-10-14 19:52:00 +02:00
parent da73cf98b5
commit 0b19d89416
17 changed files with 64 additions and 60 deletions

View File

@@ -18,7 +18,7 @@ export default class IMouseClick extends IPointing {
options.clickButton ??= 0
options.consumeEvent ??= true
options.exitAnyButton ??= true
options.looseTarget ??= false
options.strictTarget ??= false
super(target, blueprint, options)
this.clickedPosition = [0, 0]
let self = this
@@ -28,7 +28,7 @@ export default class IMouseClick extends IPointing {
switch (e.button) {
case self.options.clickButton:
// Either doesn't matter or consider the click only when clicking on the target, not descandants
if (self.options.looseTarget || e.target == e.currentTarget) {
if (!self.options.strictTarget || e.target == e.currentTarget) {
if (self.options.consumeEvent) {
e.stopImmediatePropagation() // Captured, don't call anyone else
}