mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Add overlays after loading tileSource, when using per-tileSource overlays.
This commit is contained in:
parent
10526dfb19
commit
85edea7250
@ -605,6 +605,14 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
options.success = function(event) {
|
options.success = function(event) {
|
||||||
successes++;
|
successes++;
|
||||||
|
|
||||||
|
// TODO: now that options has other things besides tileSource, the overlays
|
||||||
|
// should probably be at the options level, not the tileSource level.
|
||||||
|
if (options.tileSource.overlays) {
|
||||||
|
for (var i = 0; i < options.tileSource.overlays.length; i++) {
|
||||||
|
_this.addOverlay(options.tileSource.overlays[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (originalSuccess) {
|
if (originalSuccess) {
|
||||||
originalSuccess(event);
|
originalSuccess(event);
|
||||||
}
|
}
|
||||||
@ -628,14 +636,6 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
};
|
};
|
||||||
|
|
||||||
_this.addTiledImage(options);
|
_this.addTiledImage(options);
|
||||||
|
|
||||||
// TODO: now that options has other things besides tileSource, the overlays
|
|
||||||
// should probably be at the options level, not the tileSource level.
|
|
||||||
if (options.tileSource.overlays) {
|
|
||||||
for (var i = 0; i < options.tileSource.overlays.length; i++) {
|
|
||||||
_this.addOverlay(options.tileSource.overlays[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// TileSources
|
// TileSources
|
||||||
|
Loading…
Reference in New Issue
Block a user