These are chat archives for openseadragon/openseadragon

27th
Sep 2016
John Hoffer
@thejohnhoffer
Sep 27 2016 18:11
How does the output of viewport.getZoom() match up with the zoom level passed to viewport.zoomTo? Is there a way to get the best zoom level for a given zoom value? Should I take the base 2 log of getZoom() and then round?
Samuel Allen
@dehuszar
Sep 27 2016 18:52
Has anyone tried to pass a context into a OpenSeadragonViewerInputHook? I'm trying to do something in a hook, only if a value in my current context is true, but I'm having trouble finding the right place to send my data into the hook
John Hoffer
@thejohnhoffer
Sep 27 2016 18:53
This message was deleted
Are you able to just bind the context to the handler as below for the context of this?
Or, using the v1.1 syntax:
viewer.addViewerInputHook({hooks: [
        {tracker: 'viewer', handler: 'scrollHandler', hookHandler: this.onViewerScroll.bind(this)},
        {tracker: 'viewer', handler: 'clickHandler', hookHandler: this.onViewerClick.bind(this)}
    ]})
Samuel Allen
@dehuszar
Sep 27 2016 19:02
Perfect! Thanks!