Don't look for alt tiles if alpha is 1

This commit is contained in:
Tim Schaub
2017-09-27 11:55:34 -06:00
parent 3161e5bbaf
commit 68a1a497b0
3 changed files with 19 additions and 19 deletions
+10 -1
View File
@@ -200,7 +200,6 @@ ol.Tile.prototype.getAlpha = function(id, time) {
var delta = time - start + (1000 / 60); // avoid rendering at 0
if (delta >= this.transition_) {
this.transitionStarts_[id] = -1;
return 1;
}
return ol.easing.easeIn(delta / this.transition_);
@@ -219,3 +218,13 @@ ol.Tile.prototype.inTransition = function(id) {
}
return this.transitionStarts_[id] !== -1;
};
/**
* Mark a transition as complete.
* @param {number} id An id for the renderer.
*/
ol.Tile.prototype.endTransition = function(id) {
if (this.transition_) {
this.transitionStarts_[id] = -1;
}
};