openseadragon/openseadragon — pull request #331 by avandecreme (2014-01-29 21:47:47+00:00)
Title: Overlays redesign

So the goal of this pull request is to move all overlay's code from drawer to viewer.

Couple things to clarify:
* should the methods addOverlay, updateOverlay, removeOverlay and clearOverlays in drawer be kept for a while and marked as deprecated. (They would just call the corresponding method in viewer)
* as documented here: http://openseadragon.github.io/examples/ui-overlays/ the overlays can either be associated to an image (first example) or to the viewer (second example). However, the addOverlay method does not provide a way to associate the overlay to the viewer. Should we add a boolean parameter "global" to allows that? Similarly, the clearOverlays method delete all overlays regardless of their association. We could add a boolean parameter includeGlobal. Note that the global overlays reappear when switching to another image.
* the first commit is removing not working code. From what I understood, the goal was to be able to do things like this:
```javascript
var overlayControl = new OpenSeadragon.Overlay( "overlay-controls", {
x: 10000,
y: 10000,
width: 1000,
height: 1000
} );
var viewer = OpenSeadragon( {
id: "contentDiv",
prefixUrl: "openseadragon/images/",
tileSources: "pyramids/stitched_c01_t001.dzi",
overlayControls: [ overlayControl ]
} );
```
But after fixing multiple bugs (for example there is no overlay.rect property) , it is still not working. So I guess it is safe to say that no one use that and that it can be removed.