Rename ol.Map#render to ol.Map#renderSync
This commit is contained in:
@@ -103,6 +103,6 @@ ol.control.Control.prototype.setMap = function(map) {
|
|||||||
this.listenerKeys.push(goog.events.listen(map,
|
this.listenerKeys.push(goog.events.listen(map,
|
||||||
ol.MapEventType.POSTRENDER, this.handleMapPostrender, false, this));
|
ol.MapEventType.POSTRENDER, this.handleMapPostrender, false, this));
|
||||||
}
|
}
|
||||||
map.render();
|
map.renderSync();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ ol.control.ZoomSlider.direction = {
|
|||||||
ol.control.ZoomSlider.prototype.setMap = function(map) {
|
ol.control.ZoomSlider.prototype.setMap = function(map) {
|
||||||
goog.base(this, 'setMap', map);
|
goog.base(this, 'setMap', map);
|
||||||
if (!goog.isNull(map)) {
|
if (!goog.isNull(map)) {
|
||||||
map.render();
|
map.renderSync();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,6 @@
|
|||||||
@exportProperty ol.Map.prototype.removeInteraction
|
@exportProperty ol.Map.prototype.removeInteraction
|
||||||
@exportProperty ol.Map.prototype.removeLayer
|
@exportProperty ol.Map.prototype.removeLayer
|
||||||
@exportProperty ol.Map.prototype.removeOverlay
|
@exportProperty ol.Map.prototype.removeOverlay
|
||||||
@exportProperty ol.Map.prototype.render
|
@exportProperty ol.Map.prototype.renderSync
|
||||||
@exportProperty ol.Map.prototype.requestRenderFrame
|
@exportProperty ol.Map.prototype.requestRenderFrame
|
||||||
@exportProperty ol.Map.prototype.updateSize
|
@exportProperty ol.Map.prototype.updateSize
|
||||||
|
|||||||
@@ -866,7 +866,7 @@ ol.Map.prototype.handlePostRender = function() {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.handleSizeChanged_ = function() {
|
ol.Map.prototype.handleSizeChanged_ = function() {
|
||||||
this.render();
|
this.renderSync();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -917,7 +917,7 @@ ol.Map.prototype.handleTileChange_ = function() {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.handleViewPropertyChanged_ = function() {
|
ol.Map.prototype.handleViewPropertyChanged_ = function() {
|
||||||
this.render();
|
this.renderSync();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -935,7 +935,7 @@ ol.Map.prototype.handleViewChanged_ = function() {
|
|||||||
view, ol.ObjectEventType.PROPERTYCHANGE,
|
view, ol.ObjectEventType.PROPERTYCHANGE,
|
||||||
this.handleViewPropertyChanged_, false, this);
|
this.handleViewPropertyChanged_, false, this);
|
||||||
}
|
}
|
||||||
this.render();
|
this.renderSync();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -945,7 +945,7 @@ ol.Map.prototype.handleViewChanged_ = function() {
|
|||||||
*/
|
*/
|
||||||
ol.Map.prototype.handleLayerGroupMemberChanged_ = function(event) {
|
ol.Map.prototype.handleLayerGroupMemberChanged_ = function(event) {
|
||||||
goog.asserts.assertInstanceof(event, goog.events.Event);
|
goog.asserts.assertInstanceof(event, goog.events.Event);
|
||||||
this.render();
|
this.renderSync();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -955,7 +955,7 @@ ol.Map.prototype.handleLayerGroupMemberChanged_ = function(event) {
|
|||||||
*/
|
*/
|
||||||
ol.Map.prototype.handleLayerGroupPropertyChanged_ = function(event) {
|
ol.Map.prototype.handleLayerGroupPropertyChanged_ = function(event) {
|
||||||
goog.asserts.assertInstanceof(event, ol.ObjectEvent);
|
goog.asserts.assertInstanceof(event, ol.ObjectEvent);
|
||||||
this.render();
|
this.renderSync();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -981,7 +981,7 @@ ol.Map.prototype.handleLayerGroupChanged_ = function() {
|
|||||||
this.handleLayerGroupMemberChanged_, false, this)
|
this.handleLayerGroupMemberChanged_, false, this)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
this.render();
|
this.renderSync();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -1013,7 +1013,7 @@ ol.Map.prototype.isDef = function() {
|
|||||||
/**
|
/**
|
||||||
* Render.
|
* Render.
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.render = function() {
|
ol.Map.prototype.renderSync = function() {
|
||||||
if (this.animationDelay_.isActive()) {
|
if (this.animationDelay_.isActive()) {
|
||||||
// pass
|
// pass
|
||||||
} else if (this.freezeRenderingCount_ === 0) {
|
} else if (this.freezeRenderingCount_ === 0) {
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ ol.renderer.Layer.prototype.prepareFrame = goog.abstractMethod;
|
|||||||
ol.renderer.Layer.prototype.renderIfReadyAndVisible = function() {
|
ol.renderer.Layer.prototype.renderIfReadyAndVisible = function() {
|
||||||
var layer = this.getLayer();
|
var layer = this.getLayer();
|
||||||
if (layer.getVisible() && layer.getSourceState() == ol.source.State.READY) {
|
if (layer.getVisible() && layer.getSourceState() == ol.source.State.READY) {
|
||||||
this.getMap().render();
|
this.getMap().renderSync();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ ol.renderer.webgl.Map.prototype.handleWebGLContextLost = function(event) {
|
|||||||
*/
|
*/
|
||||||
ol.renderer.webgl.Map.prototype.handleWebGLContextRestored = function() {
|
ol.renderer.webgl.Map.prototype.handleWebGLContextRestored = function() {
|
||||||
this.initializeGL_();
|
this.initializeGL_();
|
||||||
this.getMap().render();
|
this.getMap().renderSync();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user