events: just in case, fake polyfill Touch event object

This commit is contained in:
bordun 2018-01-23 10:28:17 +01:00
parent 2ff9c52f45
commit 1c2f683468
2 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,4 @@
const {fix, normalizeEvent, resetEventOffset} = require('./utils')
const {fix, normalizeEvent, resetEventOffset, Touch} = require('./utils')
var targets = {},
previousPointers = {}

View file

@ -1,3 +1,5 @@
const Touch = window.Touch || class Touch {}
module.exports = {
fix: function(e) {
@ -87,7 +89,9 @@ module.exports = {
left: offsetLeft,
top: offsetTop
}
}
},
Touch: Touch
}