Handle map size changes in the renderer

This commit is contained in:
Tim Schaub
2012-09-26 14:10:16 +02:00
parent 5b36cf1312
commit 3510c37e43

View File

@@ -117,6 +117,22 @@ ol.renderer.dom.Map.prototype.handleResolutionChanged = function() {
};
/**
* @inheritDoc
*/
ol.renderer.dom.Map.prototype.handleSizeChanged = function() {
goog.base(this, 'handleSizeChanged');
var map = this.getMap();
if (!map.isDef()) {
return;
}
// FIXME: resetLayersPane_ should be called
// elsewhere as we may be frozen here
this.resetLayersPane_();
map.render();
};
/**
* Reset the layers pane to its initial position.
* @private