I have problems to remove a handler from the viewer.
viewer.addHandler('viewport-change', function() {
// do stuff works
});
viewer.addHandler('zoom', function() {
if (viewer.viewport.getZoom() > threshold) {
viewer.removeHandler('viewport-change', function() {
console.log("removed");
});
console.log("Zoom:" + viewer.viewport.getZoom());
}
});
I can see the output with the zoom factor, but I never saw the "removed" output. Also just adding and removing the "viewport-change"-handler did not worked. removeAllHandlers seems to work, but I fail with removing only one handler.
What I really try to do is something like a swipe effect. If the image is not zoomed in and the left edge hits the viewer border i want to show next image. Maybe there is a better way to do that.
Thanks in advance