Skip to content

Commit

Permalink
Merge pull request #2952 from camptocamp/scaleselector_better_refresh
Browse files Browse the repository at this point in the history
Only update the scale value at the end of the zoom animation
  • Loading branch information
fredj authored Oct 13, 2017
2 parents c59c30f + 9ca899a commit 68b9a86
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/directives/scaleselector.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,11 @@ ngeo.ScaleselectorController.prototype.handleResolutionChange_ = function(e) {
//
// For that reason we use $applyAsync instead of $apply here.

this.$scope_.$applyAsync(() => {
this.currentScale = currentScale;
});
if (currentScale !== undefined) {
this.$scope_.$applyAsync(() => {
this.currentScale = currentScale;
});
}
};


Expand Down

0 comments on commit 68b9a86

Please sign in to comment.