These are chat archives for openseadragon/openseadragon

31st
Aug 2017
Oswaldo Capriles
@pipriles
Aug 31 2017 03:02
I am trying to switch to Hammer.js to better touch support but can't catch any event
Oswaldo Capriles
@pipriles
Aug 31 2017 03:08
This time i don't have any clue what's happening here
Oswaldo Capriles
@pipriles
Aug 31 2017 03:55
In fact just to add addEventListener('pointerdown', ...) openseadragon eats everything
Ian Gilman
@iangilman
Aug 31 2017 16:39
@pipriles I think if you're going to use Hammer you should turn off the built-in OSD gesture handling entirely. viewer.setMouseNavEnabled(false) should do it
Oswaldo Capriles
@pipriles
Aug 31 2017 17:53
@iangilman The problem with that is that it would disable drag and pinch for openseadragon and i would have to re implement all that...
I just want to conserve openseadragon events listeners, for example now i can toggle freeDrawing for fabric js and draw over openseadragon canvas. But for that i would have to disable gesture handling as you said. Because it would work not as expected.
But i wanted to converse the scroll to zoom from openseadragon while drawing, so i need the gesture handling to be enable when the mouse is not down and when is up i disable the gestureHandling.
The only reason i want to do such complex thing is because i want to be able to pinch, and detect more stuff while the freeDrawing is enabled but also i want keep openseadragon events like scroll...
But looks like i just can't have them working together at the same time
Ian Gilman
@iangilman
Aug 31 2017 21:07
@pipriles Sounds complicated! Would it work to reimplement pinch yourself using Hammer and then calling viewer.viewport.zoomBy?
Oswaldo Capriles
@pipriles
Aug 31 2017 23:38
@iangilman I guess it will work... But then i would have to reimplement scroll to
But for desktop for now it works but for mobile i don't have the pinch support so...
But i guess i have to reimplement it or detect if mobile and fix it just reimplementing pinch and drag
Ian Gilman
@iangilman
Aug 31 2017 23:48
@pipriles Yeah... maybe just start with the mobile fix if that's all you need
I'm sorry the OSD mouse tracker is so aggressive about the events... it does that as part of its handling for mouse and touch and pen
Anyway, reimplementing pinch and drag shouldn't be too hard