doubletap: missing offsetX & offsetY on touch devices

This commit is contained in:
jean-emmanuel 2023-05-09 16:18:05 +02:00
parent 94d791e4cf
commit 5126125dba
2 changed files with 9 additions and 1 deletions

View file

@ -1,5 +1,11 @@
# Changelog
## 1.24.3
- bug fixes
- multixy: doubleTap not working on touch devices
- button: `x` and `y` variables not passed to `onValue` when `doubleTap` is true on touch devices
## 1.24.2
- bug fixes

View file

@ -1,3 +1,5 @@
var {normalizeDragEvent} = require('../../events/utils')
module.exports = (self, callback, options={})=>{
var lastTapTime = 0,
@ -23,7 +25,7 @@ module.exports = (self, callback, options={})=>{
// execute callback at next cycle to ensure draginit events are resolved first
setTimeout(()=>{
callback(event.detail)
callback(normalizeDragEvent(event.detail))
}, 0)
lastTapTime = 0