Open ChrisHSandN opened 2 years ago
openseadragon-viewerinputhook preventDefaultAction no longer functions on v3 of OSD. The hookHandler gets called, however the viewer image continues to pan around.
preventDefaultAction
hookHandler
Working on 2.4.2 https://jsfiddle.net/chris_h/0nd9pbhf/ Broken on 3.1.0: https://jsfiddle.net/chris_h/4dcpwm38/
var viewer = OpenSeadragon({ id: "osd", tileSources: [{ type: "image", url: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAABhElEQVR42u3TAQ0AAAgDIN8/9C1gAgcdyLQd4BRBQBAQBAQBQUAQEAQEAUFAEEAQEAQEAUFAEBAEBAFBQBAQRBAQBAQBQUAQEAQEAUFAEBAEEAQEAUFAEBAEBAFBQBAQBAQBBAFBQBAQBAQBQUAQEAQEAQQBQUAQEAQEAUFAEBAEBAFBAEFAEBAEBAFBQBAQBAQBQQBBQBAQBAQBQUAQEAQEAUFAEEAQEAQEAUFAEBAEBAFBQBAQRBAQBAQBQUAQEAQEAUFAEBAEEAQEAUFAEBAEBAFBQBAQBAQRBAQBQUAQEAQEAUFAEBAEBAEEAUFAEBAEBAFBQBAQBAQBQQBBQBAQBAQBQUAQEAQEAUEAQUAQEAQEAUFAEBAEBAFBQBBAEBAEBAFBQBAQBAQBQUAQQBAQBAQBQUAQEAQEAUFAEBAEEAQEAUFAEBAEBAFBQBAQBAQRBAQBQUAQEAQEAUFAEBAEBAEEAUFAEBAEBAFBQBAQBAQBQQQBQUAQEAQEAUFAEBAEPlo7TFaPRUFQyQAAAABJRU5ErkJggg==" }] }); new OpenSeadragonImaging.ViewerInputHook({ viewer: viewer, hooks: [{ tracker: 'viewer', handler: 'dragHandler', hookHandler: function(event) { event.preventDefaultAction = true; } }, ] });
<div id="osd"></div>
#osd { width: 500px; height: 500px; }
@msalsbery Any thoughts?
Description
openseadragon-viewerinputhook
preventDefaultAction
no longer functions on v3 of OSD. ThehookHandler
gets called, however the viewer image continues to pan around.JS Fiddle:
Working on 2.4.2 https://jsfiddle.net/chris_h/0nd9pbhf/ Broken on 3.1.0: https://jsfiddle.net/chris_h/4dcpwm38/
Testcase