Skip to content

Commit

Permalink
#492 updateVectorLayer calls causes flat panorama view to revert to w…
Browse files Browse the repository at this point in the history
…rapped panorama view
  • Loading branch information
tariqksoliman committed Feb 8, 2024
1 parent d34eddd commit dbf6f45
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/essence/Basics/Viewer_/Viewer_.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ var Viewer_ = {
//images is [ { 'url': '', 'name': '', 'isPanoramic': false },{...}, ... ]
//Shows the first image too
changeImages: function (images, feature, layer) {
// Don't refresh if the same exact point is clicked,
// that's just annoying. So skip over it.
if (
Viewer_.feature &&
JSON.stringify(Viewer_.feature) === JSON.stringify(feature) &&
Viewer_.layer &&
Viewer_.layer?.options?.layerName === layer?.options?.layerName
) {
return
}

images = images || []
Viewer_.images = images
Viewer_.feature = feature
Expand Down

0 comments on commit dbf6f45

Please sign in to comment.