Skip to content

Commit

Permalink
Merge pull request #3549 from ProjectSidewalk/3542-cleanup-buggy-Labe…
Browse files Browse the repository at this point in the history
…lMap-code

Added check for 404 bug, and removed labelmap breaking code
  • Loading branch information
misaugstad authored May 18, 2024
2 parents 4781a73 + bd04cc2 commit 7029cb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
12 changes: 0 additions & 12 deletions app/views/labelMap.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,5 @@
});
});
}

// Fully destroy label modal when it's closed to prevent weird behavior when opening another.
$(window).on('click', function(e) {
var modal = $("#labelModal");
if (modal != null && !(modal.hasClass('in'))) {
modal.modal('hide');
setTimeout(function() {
modal.remove();
$('.modal-backdrop').remove();
}, 200)
}
});
</script>
}
5 changes: 4 additions & 1 deletion public/javascripts/Admin/src/Admin.GSVLabelView.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,10 @@ function AdminGSVLabelView(admin, source) {
}

function showLabel(labelId) {
_resetModal();
// Reset modal when gsv panorama is not found.gi
if (self.panorama.panorama.getStatus() === "ZERO_RESULTS") {
_resetModal();
}

self.modal.modal({
'show': true
Expand Down

0 comments on commit 7029cb3

Please sign in to comment.