diff --git a/examples/al-gaiadr3.html b/examples/al-gaiadr3.html new file mode 100644 index 00000000..206e9b00 --- /dev/null +++ b/examples/al-gaiadr3.html @@ -0,0 +1,146 @@ + + + + + + + + + Explore Gaia DR3 in Aladin Lite + + + +
+
+
+ + + + + +
+
+ + + + + + + \ No newline at end of file diff --git a/src/css/aladin.css b/src/css/aladin.css index 466942f8..be224f27 100644 --- a/src/css/aladin.css +++ b/src/css/aladin.css @@ -435,8 +435,16 @@ word-wrap:break-word; border-color: #357ebd; } +.aladin-layer-main { + background-color: #ddd; +} + .aladin-btn-small { - font-size: 10px; + border-radius: 3px; + border: 1px solid transparent; + color: #ffffff; + background-color: #428bca; + border-color: #357ebd; } .aladin-button:hover { diff --git a/src/js/Aladin.js b/src/js/Aladin.js index 41d85382..f2ea49f5 100644 --- a/src/js/Aladin.js +++ b/src/js/Aladin.js @@ -482,7 +482,7 @@ export let Aladin = (function () { }); } - Aladin.prototype.updateSurveysDropdownList = function (surveys) { + /*Aladin.prototype.updateSurveysDropdownList = function (surveys) { //console.log(surveys) surveys = surveys.sort(function (a, b) { if (!a.order) { @@ -515,7 +515,7 @@ export let Aladin = (function () { select.append($("'; @@ -49,9 +69,7 @@ // - for FITS hipses, it is changed to grayscale // - for JPG/PNG hipses, we do not use any colormap in the backend cmListStr += ''; - - this.surveySelectionDiv = $(''); - this.mainDiv = $(''); @@ -246,20 +267,6 @@ export class Stack { layerBox.find('.aladin-closeBtn').click(function () { self.aladin.hideBoxes(); return false; }); - // update list of surveys - //this.aladin.updateSurveysDropdownList(HpxImageSurvey.getAvailableSurveys()); - /*var surveySelection = $(this.mainDiv).find('.aladin-surveySelection'); - surveySelection.change(function () { - var survey = HpxImageSurvey.getAvailableSurveys()[$(this)[0].selectedIndex]; - //console.log("survey, chosen ", survey) - const hpxImageSurvey = new HpxImageSurvey( - survey.url, - self.view, - survey.options - ); - self.aladin.setImageSurvey(hpxImageSurvey); - });*/ - // handler to hide/show overlays $(this.mainDiv).find('ul input').change(function () { var layerName = ($(this).attr('id').substr(12)); @@ -275,26 +282,14 @@ export class Stack { #addListeners() { let self = this; - const layerBox = $(this.mainDiv); + this.aladin.aladinDiv.addEventListener('remove-layer', e => { + const layerName = e.detail; + console.log("ksdlfs", e.detail); - layerBox.find('button').click(function () { - const layerName = $(layerBox.find('.layer-name')[0]).val(); + self.imgLayers.delete(layerName); + self.aladin.view.removeImageSurvey(layerName); - /*if (self.imgLayers.has(layerName)) { - throw 'Layer ' + layerName + ' already exist.'; - }*/ - - self.aladin.setOverlayImageLayer( - 'CDS/P/DSS2/color', - (survey) => { - console.log("loaded") - self.imgLayers.set(layerName, new HiPSLayer(self.aladin, self.view, layerName)); - survey.setOpacity(0.5) - - self.#createComponent(); - }, - layerName - ); + self.#createComponent(); }); }