Switch to asynchronous rendering by default

This commit is contained in:
Tom Payne
2014-02-20 19:42:00 +01:00
parent a8f932fa07
commit 316c146613
5 changed files with 10 additions and 10 deletions

View File

@@ -103,6 +103,6 @@ ol.control.Control.prototype.setMap = function(map) {
this.listenerKeys.push(goog.events.listen(map,
ol.MapEventType.POSTRENDER, this.handleMapPostrender, false, this));
}
map.renderSync();
map.render();
}
};

View File

@@ -116,7 +116,7 @@ ol.control.ZoomSlider.direction = {
ol.control.ZoomSlider.prototype.setMap = function(map) {
goog.base(this, 'setMap', map);
if (!goog.isNull(map)) {
map.renderSync();
map.render();
}
};

View File

@@ -866,7 +866,7 @@ ol.Map.prototype.handlePostRender = function() {
* @private
*/
ol.Map.prototype.handleSizeChanged_ = function() {
this.renderSync();
this.render();
};
@@ -917,7 +917,7 @@ ol.Map.prototype.handleTileChange_ = function() {
* @private
*/
ol.Map.prototype.handleViewPropertyChanged_ = function() {
this.renderSync();
this.render();
};
@@ -935,7 +935,7 @@ ol.Map.prototype.handleViewChanged_ = function() {
view, ol.ObjectEventType.PROPERTYCHANGE,
this.handleViewPropertyChanged_, false, this);
}
this.renderSync();
this.render();
};
@@ -945,7 +945,7 @@ ol.Map.prototype.handleViewChanged_ = function() {
*/
ol.Map.prototype.handleLayerGroupMemberChanged_ = function(event) {
goog.asserts.assertInstanceof(event, goog.events.Event);
this.renderSync();
this.render();
};
@@ -955,7 +955,7 @@ ol.Map.prototype.handleLayerGroupMemberChanged_ = function(event) {
*/
ol.Map.prototype.handleLayerGroupPropertyChanged_ = function(event) {
goog.asserts.assertInstanceof(event, ol.ObjectEvent);
this.renderSync();
this.render();
};
@@ -981,7 +981,7 @@ ol.Map.prototype.handleLayerGroupChanged_ = function() {
this.handleLayerGroupMemberChanged_, false, this)
];
}
this.renderSync();
this.render();
};

View File

@@ -109,7 +109,7 @@ ol.renderer.Layer.prototype.prepareFrame = goog.abstractMethod;
ol.renderer.Layer.prototype.renderIfReadyAndVisible = function() {
var layer = this.getLayer();
if (layer.getVisible() && layer.getSourceState() == ol.source.State.READY) {
this.getMap().renderSync();
this.getMap().render();
}
};

View File

@@ -387,7 +387,7 @@ ol.renderer.webgl.Map.prototype.handleWebGLContextLost = function(event) {
*/
ol.renderer.webgl.Map.prototype.handleWebGLContextRestored = function() {
this.initializeGL_();
this.getMap().renderSync();
this.getMap().render();
};