Skip to content

Commit 9724b39

Browse files
committed
fix gl3d hover on mobile and tablet devices
1 parent 7b09f1d commit 9724b39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

camera.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,21 +192,21 @@ function createCamera(element, options) {
192192
handleInteraction(1, xy[0], xy[1], camera._lastMods)
193193

194194
ev.preventDefault()
195-
}, hasPassive ? {passive: false} : false)
195+
}, hasPassive ? {passive: true} : false)
196196

197197
element.addEventListener('touchmove', function (ev) {
198198
var xy = mouseOffset(ev.changedTouches[0], element)
199199
handleInteraction(1, xy[0], xy[1], camera._lastMods)
200200

201201
ev.preventDefault()
202-
}, hasPassive ? {passive: false} : false)
202+
}, hasPassive ? {passive: true} : false)
203203

204204
element.addEventListener('touchend', function (ev) {
205205

206206
handleInteraction(0, camera._lastX, camera._lastY, camera._lastMods)
207207

208208
ev.preventDefault()
209-
}, hasPassive ? {passive: false} : false)
209+
}, hasPassive ? {passive: true} : false)
210210

211211
function handleInteraction (buttons, x, y, mods) {
212212
var keyBindingMode = camera.keyBindingMode

0 commit comments

Comments
 (0)