openseadragon/openseadragon — pull request #179 by lukemurray (2013-08-07 01:04:51+00:00)
Title: Add a destroy function on the viewer to clean up and remove elements

Add a destroy function on the viewer to clean up and remove elements created by open seadragon. Add removeAllHandlersForAllEvents to clean up all events on destroy. Clear
the onDraw callback on Overlay destroy.

pretty sure the biggest thing here is the events and removing the child elements.

Let me know if you have any comments etc.