Skip to content

Commit

Permalink
Don't show selection for focused feature
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Nov 26, 2024
1 parent d924ac1 commit f1bc03f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ function focusEntity(entityInfo) {
document.getElementById("nameplate").style.display = focusedEntityInfo ? 'flex' : 'none';

reloadFocusAreaIfNeeded();
updateMapForSelection();
}

function selectEntity(entityInfo) {
Expand Down
4 changes: 3 additions & 1 deletion js/mapController.js
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,9 @@ function updateMapForSelection() {
let id = selectedEntityInfo && selectedEntityInfo.id;
let type = selectedEntityInfo && selectedEntityInfo.type;

let idsToHighlight = [id ? id : -1];
let focusedId = focusedEntityInfo?.id;

let idsToHighlight = [id && id !== focusedId ? id : -1];

if (type === "relation") {
let members = osmEntityCache[type[0] + id]?.members || [];
Expand Down

0 comments on commit f1bc03f

Please sign in to comment.