Add the option for a zoom handler callback

This commit is contained in:
Luke Murray 2013-07-12 16:51:56 +10:00
parent 21ec16f2a7
commit 233c3a357a
2 changed files with 9 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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;