From 97381b04a908d41ad10415b8656c06f07bd1bdfd Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov Date: Sat, 20 Feb 2016 00:45:33 +0300 Subject: [PATCH] return null instead of false in Viewer.getOverlayById function and correct documentation --- src/viewer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index 8a2e5b0a..6165b18e 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1947,11 +1947,11 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, /** * Finds an overlay identified by the reference element or element id - * and returns it as an object, return false if not found. + * and returns it as an object, return null if not found. * @method * @param {Element|String} element - A reference to the element or an * element id which represent the ovelay content to be removed. - * @return {OpenSeadragon.Overlay} Chainable. + * @return {OpenSeadragon.Overlay} the matching overlay or null if none found. */ getOverlayById: function( element ) { var i; @@ -1962,7 +1962,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, if (i>=0) { return this.currentOverlays[i]; } else { - return false; + return null; } },