mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-16 14:53:14 +03:00
Add the option for a zoom handler callback
This commit is contained in:
parent
21ec16f2a7
commit
233c3a357a
@ -430,7 +430,10 @@ $.Drawer.prototype = {
|
||||
$.OverlayPlacement[overlay.placement.toUpperCase()]
|
||||
);
|
||||
}else{
|
||||
return new $.Overlay( element, rect );
|
||||
var newOverlay = new $.Overlay(element, rect);
|
||||
if (overlay.zoomHandler)
|
||||
newOverlay.zoomHandler = overlay.zoomHandler;
|
||||
return newOverlay;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -176,6 +176,11 @@
|
||||
this.size = $.getElementSize( element );
|
||||
}
|
||||
|
||||
if (this.zoomHandler) {
|
||||
this.zoomHandler(this.position, this.size, element);
|
||||
return;
|
||||
}
|
||||
|
||||
position = this.position;
|
||||
size = this.size;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user