doubletap: don't check pointerId (always different on ios, and checking position should be enough) (#356)
This commit is contained in:
parent
13f2133c6a
commit
42a1390170
2 changed files with 3 additions and 5 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- bug fixes
|
||||
- editor: opening the sidepanel doesn't select the root widget anymore
|
||||
- ios: overscroll and pull-to-refresh are now prevented
|
||||
- ios: fix `doubleTap`
|
||||
- widgets
|
||||
- **new** `gyroscope` widget
|
||||
- **new** `frame` widget
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ module.exports = (element, callback)=>{
|
|||
|
||||
var lastTapTime = 0,
|
||||
lastTapX,
|
||||
lastTapY,
|
||||
touchId
|
||||
lastTapY
|
||||
|
||||
element.addEventListener('fast-click', (event)=>{
|
||||
|
||||
|
|
@ -14,7 +13,7 @@ module.exports = (element, callback)=>{
|
|||
|
||||
if (
|
||||
|
||||
tapLength < DOUBLE_TAP_TIME && touchId == eventData.pointerId &&
|
||||
tapLength < DOUBLE_TAP_TIME &&
|
||||
Math.abs(lastTapX - eventData.pageX) < 20 &&
|
||||
Math.abs(lastTapY - eventData.pageY) < 20
|
||||
|
||||
|
|
@ -26,7 +25,6 @@ module.exports = (element, callback)=>{
|
|||
} else {
|
||||
|
||||
lastTapTime = tapTime
|
||||
touchId = eventData.pointerId
|
||||
lastTapX = eventData.pageX
|
||||
lastTapY = eventData.pageY
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue