Make map handle size changes

This commit is contained in:
Éric Lemoine
2013-01-24 22:06:47 +01:00
parent 71a462cd54
commit 15898b559b
3 changed files with 11 additions and 22 deletions

View File

@@ -285,6 +285,8 @@ ol.Map = function(mapOptions) {
goog.events.listen(this, ol.Object.getChangedEventType(ol.MapProperty.VIEW),
this.handleViewChanged_, false, this);
goog.events.listen(this, ol.Object.getChangedEventType(ol.MapProperty.SIZE),
this.handleSizeChanged_, false, this);
this.setValues(mapOptionsInternal.values);
this.handleBrowserWindowResize();
@@ -567,6 +569,14 @@ ol.Map.prototype.handleBrowserWindowResize = function() {
};
/**
* @private
*/
ol.Map.prototype.handleSizeChanged_ = function() {
this.render();
};
/**
* @private
*/