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

View File

@@ -230,9 +230,13 @@ ol.renderer.dom.VectorLayer.prototype.prepareFrame =
frameState.attributions, vectorSource.getAttributions());
this.updateLogos(frameState, vectorSource);
if (!this.dirty_ && (!vectorLayer.getUpdateWhileAnimating() &&
frameState.viewHints[ol.ViewHint.ANIMATING] ||
frameState.viewHints[ol.ViewHint.INTERACTING])) {
var animating = frameState.viewHints[ol.ViewHint.ANIMATING];
var interacting = frameState.viewHints[ol.ViewHint.INTERACTING];
var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();
if (!this.dirty_ && (!updateWhileAnimating && animating) ||
(!updateWhileInteracting && interacting)) {
return true;
}