From f86f9063fd32a4164169cb8ec4c7ab61a02f69fb Mon Sep 17 00:00:00 2001 From: Henri Astre Date: Wed, 18 Jun 2014 12:56:36 -0700 Subject: [PATCH] Improve comment for destroy() method. --- src/viewer.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index cb8e295f..7ba1e7c0 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -578,8 +578,17 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, /** - * Function to destroy the viewer and clean up everything created by - * OpenSeadragon. + * Function to destroy the viewer and clean up everything created by OpenSeadragon. + * + * Example: + * var viewer = OpenSeadragon({ + * [...] + * }); + * + * //when you are done with the viewer: + * viewer.destroy(); + * viewer = null; //important + * * @function */ destroy: function( ) {