Make map handle size changes
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user