cds-astro / aladin-lite

An astronomical HiPS visualizer in the browser
https://aladin.cds.unistra.fr/AladinLite/
GNU General Public License v3.0
99 stars 41 forks source link

showPopup on catalog source click does not work #184

Closed havok2063 closed 2 weeks ago

havok2063 commented 1 month ago

Adding the catalog option onClick: showPopup does not work and the table continues to display. I want to display catalog sources but instead of displaying the single-row catalog table on source click, I want to display the popup, like with the markers.

Replace the following code

var aladin;
A.init.then(() => {
    aladin = A.aladin('#aladin-lite-div', {survey: 'P/DSS2/red', target: 'M50', fov: 0.3});

        var cat = A.catalog({name: "Temp", sourceSize: 18, onClick: 'showPopup'});
        aladin.addCatalog(cat);
        cat.addSources(A.source(105.69239256, -8.45235969, {a: 1, b: 2, c:3}));
        cat.addSources(A.source(105.70779763, -8.31350997, {a: 4, b: 5, c:6}));
        cat.addSources(A.source(105.74242906, -8.34776709, {a: 7, b: 8, c:9}));

});

in here, https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/cat-custom-shape/. That example uses api/v3/latest/aladin.js but also verified in version 3.4.5.

Even in this example with the markers, https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/marker-creation/, the empty catalog table still displays on source click.

havok2063 commented 1 month ago

Maybe this is related to https://github.com/cds-astro/aladin-lite/issues/179?

bmatthieu3 commented 1 month ago

Yes this might have been linked. From my test it now works. A new release will be done in september when I get back from holidays.

bmatthieu3 commented 2 weeks ago

This works again in the codebase