Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/hitide-ui-65: fixed thumbnails and footprints disappearing #73

Merged
merged 4 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
### Removed
### Fixed
- issue-65: Fixed footprints and previews disappearing from map when not intended


## [4.17.1]
Expand Down
5 changes: 3 additions & 2 deletions src/hitideConfig.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var hitideProfileOrigin = "https://hitide.profile.podaac.uat.earthdatacloud.nasa.gov/hitide/api";
// var hitideProfileOrigin = "http://localhost:8080/hitide/api";

window.hitideConfig = {
paletteService: "https://hitide.podaac.earthdatacloud.nasa.gov/palettes",
Expand All @@ -10,7 +11,7 @@ window.hitideConfig = {
cmrVariableService: hitideProfileOrigin + "/cmr/graphql",
crossOriginCmrCookies: true,

authCodeUrl: "https://uat.urs.earthdata.nasa.gov/oauth/authorize",
authCodeUrl: "https://urs.earthdata.nasa.gov/oauth/authorize",

loginUrl: hitideProfileOrigin + "/session/login",
logoutUrl: hitideProfileOrigin + "/session/logout",
Expand All @@ -24,5 +25,5 @@ window.hitideConfig = {
datasetSearchServiceItemsPerPage: 200,
maxGranulesPerDownload: 999999999,
googleTagManagerId: "GTM-M5D83V6",
earthDataAppClientId: "dxpH2WeN_f8IpNLgHwplsg"
earthDataAppClientId: "mn6VmRfej3U2Tm0UhbC1jw"
};
24 changes: 16 additions & 8 deletions src/jpl/dijit/GranulesController.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ define([
_granuleSearchInProgress: false,
loadingGranulesMessage: '<div class="granulesControllerLoadingGranulesMessage">Loading Granules...</div>',
noGranulesMessage: '<div class="granulesControllerNoDataMessage">No Granules Found</div>',
scrollLoadInProgress: false,

constructor: function() {
this.datasetVariables = {};
Expand Down Expand Up @@ -757,14 +758,17 @@ define([
stateStoreItemsToRemove.push((currentStateStore[j]))
}
}
for(var k=0; k<stateStoreItemsToRemove.length; k++) {
_context.stateStore.remove(stateStoreItemsToRemove[k]["Granule-Id"])
topic.publish(GranuleSelectionEvent.prototype.REMOVE_GRANULE_FOOTPRINT, {
granuleObj: stateStoreItemsToRemove[k]
});
topic.publish(GranuleSelectionEvent.prototype.REMOVE_GRANULE_PREVIEW, {
granuleObj: stateStoreItemsToRemove[k]
});
// if scroll, don't remove
if(!this.scrollLoadInProgress) {
for(var k=0; k<stateStoreItemsToRemove.length; k++) {
_context.stateStore.remove(stateStoreItemsToRemove[k]["Granule-Id"])
topic.publish(GranuleSelectionEvent.prototype.REMOVE_GRANULE_FOOTPRINT, {
granuleObj: stateStoreItemsToRemove[k]
});
topic.publish(GranuleSelectionEvent.prototype.REMOVE_GRANULE_PREVIEW, {
granuleObj: stateStoreItemsToRemove[k]
});
}
}
// clear anything from state store that is not a concept id in the response items
response.items.map(function(x) {
Expand Down Expand Up @@ -838,6 +842,9 @@ define([
// Show spinner
this.displayLoadingSpinner(false);

// set scroll back to false
this.scrollLoadInProgress = false;

},

filterGranules: function() {
Expand Down Expand Up @@ -892,6 +899,7 @@ define([
// First approach, fetch more if scroll pos is 90% of way down
if ((scrollPosTop + offsetHeight) / scrollHeight > 0.90) {
this.currentSolrIdx += this.itemsPerPage;
this.scrollLoadInProgress = true;
this.fetchGranules();
}
},
Expand Down
Loading