Added logInteractionsAbove limit
This commit is contained in:
parent
a2711a735d
commit
becb749e02
13
dist/iwmlib.js
vendored
13
dist/iwmlib.js
vendored
@ -2450,9 +2450,15 @@
|
||||
constructor(
|
||||
element,
|
||||
target,
|
||||
{ tapDistance = 10, longPressTime = 500.0, useCapture = true, mouseWheelElement = null } = {}
|
||||
{ tapDistance = 10, longPressTime = 500.0, useCapture = true, mouseWheelElement = null, logInteractionsAbove = 12 } = {}
|
||||
) {
|
||||
super(element, target, { tapDistance, useCapture, longPressTime, mouseWheelElement });
|
||||
this.logInteractionsAbove = logInteractionsAbove;
|
||||
}
|
||||
|
||||
log(message) {
|
||||
let logger = (typeof app != 'undefined' && app.log) ? app : console;
|
||||
logger.log(message);
|
||||
}
|
||||
|
||||
get targetInterface() {
|
||||
@ -2474,6 +2480,11 @@
|
||||
this.interaction.addTarget(key, found);
|
||||
}
|
||||
}
|
||||
let size = this.interaction.current.size;
|
||||
let limit = this.logInteractionsAbove;
|
||||
if (size > limit) {
|
||||
this.log(`Number of interactions ${size} exceeds ${limit}`);
|
||||
}
|
||||
}
|
||||
|
||||
onMouseWheel(event) {
|
||||
|
13
dist/iwmlib.pixi.js
vendored
13
dist/iwmlib.pixi.js
vendored
@ -5614,9 +5614,15 @@
|
||||
constructor(
|
||||
element,
|
||||
target,
|
||||
{ tapDistance = 10, longPressTime = 500.0, useCapture = true, mouseWheelElement = null } = {}
|
||||
{ tapDistance = 10, longPressTime = 500.0, useCapture = true, mouseWheelElement = null, logInteractionsAbove = 12 } = {}
|
||||
) {
|
||||
super(element, target, { tapDistance, useCapture, longPressTime, mouseWheelElement });
|
||||
this.logInteractionsAbove = logInteractionsAbove;
|
||||
}
|
||||
|
||||
log(message) {
|
||||
let logger = (typeof app != 'undefined' && app.log) ? app : console;
|
||||
logger.log(message);
|
||||
}
|
||||
|
||||
get targetInterface() {
|
||||
@ -5638,6 +5644,11 @@
|
||||
this.interaction.addTarget(key, found);
|
||||
}
|
||||
}
|
||||
let size = this.interaction.current.size;
|
||||
let limit = this.logInteractionsAbove;
|
||||
if (size > limit) {
|
||||
this.log(`Number of interactions ${size} exceeds ${limit}`);
|
||||
}
|
||||
}
|
||||
|
||||
onMouseWheel(event) {
|
||||
|
@ -910,9 +910,15 @@ export class InteractionMapper extends InteractionDelegate {
|
||||
constructor(
|
||||
element,
|
||||
target,
|
||||
{ tapDistance = 10, longPressTime = 500.0, useCapture = true, mouseWheelElement = null } = {}
|
||||
{ tapDistance = 10, longPressTime = 500.0, useCapture = true, mouseWheelElement = null, logInteractionsAbove = 12 } = {}
|
||||
) {
|
||||
super(element, target, { tapDistance, useCapture, longPressTime, mouseWheelElement })
|
||||
this.logInteractionsAbove = logInteractionsAbove
|
||||
}
|
||||
|
||||
log(message) {
|
||||
let logger = (typeof app != 'undefined' && app.log) ? app : console
|
||||
logger.log(message)
|
||||
}
|
||||
|
||||
get targetInterface() {
|
||||
@ -934,6 +940,11 @@ export class InteractionMapper extends InteractionDelegate {
|
||||
this.interaction.addTarget(key, found)
|
||||
}
|
||||
}
|
||||
let size = this.interaction.current.size
|
||||
let limit = this.logInteractionsAbove
|
||||
if (size > limit) {
|
||||
this.log(`Number of interactions ${size} exceeds ${limit}`)
|
||||
}
|
||||
}
|
||||
|
||||
onMouseWheel(event) {
|
||||
|
Loading…
Reference in New Issue
Block a user