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(
|
constructor(
|
||||||
element,
|
element,
|
||||||
target,
|
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 });
|
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() {
|
get targetInterface() {
|
||||||
@ -2474,6 +2480,11 @@
|
|||||||
this.interaction.addTarget(key, found);
|
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) {
|
onMouseWheel(event) {
|
||||||
|
13
dist/iwmlib.pixi.js
vendored
13
dist/iwmlib.pixi.js
vendored
@ -5614,9 +5614,15 @@
|
|||||||
constructor(
|
constructor(
|
||||||
element,
|
element,
|
||||||
target,
|
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 });
|
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() {
|
get targetInterface() {
|
||||||
@ -5638,6 +5644,11 @@
|
|||||||
this.interaction.addTarget(key, found);
|
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) {
|
onMouseWheel(event) {
|
||||||
|
@ -910,9 +910,15 @@ export class InteractionMapper extends InteractionDelegate {
|
|||||||
constructor(
|
constructor(
|
||||||
element,
|
element,
|
||||||
target,
|
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 })
|
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() {
|
get targetInterface() {
|
||||||
@ -934,6 +940,11 @@ export class InteractionMapper extends InteractionDelegate {
|
|||||||
this.interaction.addTarget(key, found)
|
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) {
|
onMouseWheel(event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user