Add updateWhileInteracting to olx.layer.VectorOptions

This commit is contained in:
Éric Lemoine
2015-04-01 08:27:29 +02:00
parent 4619cac9ce
commit 42c4ae9ced
5 changed files with 48 additions and 9 deletions
+17
View File
@@ -37,6 +37,7 @@ ol.layer.Vector = function(opt_options) {
delete baseOptions.style;
delete baseOptions.renderBuffer;
delete baseOptions.updateWhileAnimating;
delete baseOptions.updateWhileInteracting;
goog.base(this, /** @type {olx.layer.LayerOptions} */ (baseOptions));
/**
@@ -69,6 +70,13 @@ ol.layer.Vector = function(opt_options) {
this.updateWhileAnimating_ = goog.isDef(options.updateWhileAnimating) ?
options.updateWhileAnimating : false;
/**
* @type {boolean}
* @private
*/
this.updateWhileInteracting_ = goog.isDef(options.updateWhileInteracting) ?
options.updateWhileInteracting : false;
};
goog.inherits(ol.layer.Vector, ol.layer.Layer);
@@ -130,6 +138,15 @@ ol.layer.Vector.prototype.getUpdateWhileAnimating = function() {
};
/**
* @return {boolean} Whether the rendered layer should be updated while
* interacting.
*/
ol.layer.Vector.prototype.getUpdateWhileInteracting = function() {
return this.updateWhileInteracting_;
};
/**
* @param {function(ol.Feature, ol.Feature):number|null|undefined} renderOrder
* Render order.