Don't look for alt tiles if alpha is 1
This commit is contained in:
+10
-1
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user