diff --git a/src/drawer.js b/src/drawer.js index a5cc8ac9..10281190 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -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; } } diff --git a/src/overlay.js b/src/overlay.js index d175eb7c..acee3316 100644 --- a/src/overlay.js +++ b/src/overlay.js @@ -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;