Skip to content

Commit

Permalink
fix(compass): not disappearing on click when bearing is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Oct 17, 2024
1 parent 2adafe2 commit de0c4a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/map-buttons-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ const addListeners = () => {
// De tracking a simple suivi de position
Location.disableTracking();
}
if (map.getBearing() === 0) {
DOM.$compassBtn.classList.add("d-none");
}
map.rotateTo(0);
});

Expand Down

0 comments on commit de0c4a3

Please sign in to comment.