Add updateWhileAnimating option

With this option, vector batches will be recreated with every frame.
For animations, this means that vector data won't be clipped to the
extent at which the animation started.
This commit is contained in:
Andreas Hocevar
2015-01-14 16:33:05 +01:00
parent 35468e2bbb
commit b1a73da9dd
5 changed files with 35 additions and 3 deletions

View File

@@ -209,7 +209,8 @@ ol.renderer.dom.VectorLayer.prototype.prepareFrame =
frameState.attributions, vectorSource.getAttributions());
this.updateLogos(frameState, vectorSource);
if (!this.dirty_ && (frameState.viewHints[ol.ViewHint.ANIMATING] ||
if (!this.dirty_ && (!vectorLayer.getUpdateWhileAnimating() &&
frameState.viewHints[ol.ViewHint.ANIMATING] ||
frameState.viewHints[ol.ViewHint.INTERACTING])) {
return true;
}