Added logging module
This commit is contained in:
+2
-6
@@ -4,6 +4,7 @@
|
||||
import Interface from './interface.js'
|
||||
import { Points, Angle, MapProxy } from './utils.js'
|
||||
import Events from './events.js'
|
||||
import Logging from './logging.js'
|
||||
|
||||
/** Interaction patterns
|
||||
|
||||
@@ -916,11 +917,6 @@ export class InteractionMapper extends InteractionDelegate {
|
||||
this.logInteractionsAbove = logInteractionsAbove
|
||||
}
|
||||
|
||||
log(message) {
|
||||
let logger = (typeof app != 'undefined' && app.log) ? app : console
|
||||
logger.log(message)
|
||||
}
|
||||
|
||||
get targetInterface() {
|
||||
return IInteractionMapperTarget
|
||||
}
|
||||
@@ -943,7 +939,7 @@ export class InteractionMapper extends InteractionDelegate {
|
||||
let size = this.interaction.current.size
|
||||
let limit = this.logInteractionsAbove
|
||||
if (size > limit) {
|
||||
this.log(`Number of interactions ${size} exceeds ${limit}`)
|
||||
Logging.log(`Number of interactions ${size} exceeds ${limit}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user