mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2025-12-12 15:49:18 -08:00
save the imageHiPS once it has been changed so that the HiPS stack is saved. One can go back from the UI afterwards
This commit is contained in:
committed by
Matthieu Baumann
parent
34460eb9e7
commit
116ba0d2e3
@@ -370,15 +370,16 @@ export let ImageSurvey = (function () {
|
||||
|
||||
self.formats = self.formats || [self.imgFormat];
|
||||
|
||||
self._save();
|
||||
self._saveInCache();
|
||||
|
||||
return self;
|
||||
})();
|
||||
}
|
||||
|
||||
ImageSurvey.prototype._save = function() {
|
||||
ImageSurvey.prototype._saveInCache = function() {
|
||||
let self = this;
|
||||
|
||||
let colorOpt = Object.fromEntries(Object.entries(this.colorCfg));
|
||||
let surveyOpt = {
|
||||
creatorDid: self.creatorDid,
|
||||
name: self.name,
|
||||
@@ -387,6 +388,7 @@ export let ImageSurvey = (function () {
|
||||
maxOrder: self.maxOrder,
|
||||
tileSize: self.tileSize,
|
||||
imgFormat: self.imgFormat,
|
||||
...colorOpt
|
||||
}
|
||||
|
||||
if (self.numBitsPerPixel) {
|
||||
@@ -664,6 +666,9 @@ export let ImageSurvey = (function () {
|
||||
// once the meta have been well parsed, we can set the meta
|
||||
ALEvent.HIPS_LAYER_CHANGED.dispatchedTo(this.view.aladinDiv, { layer: this });
|
||||
}
|
||||
|
||||
// save it in the JS HiPS cache
|
||||
this._saveInCache()
|
||||
} catch (e) {
|
||||
// Display the error message
|
||||
console.error(e);
|
||||
|
||||
Reference in New Issue
Block a user