WorldWideTelescope / wwt-web-client

The WorldWide Telescope web client lets you explore the universe in your browser.
https://worldwidetelescope.org/webclient/
MIT License
105 stars 35 forks source link

Fix issue with constellation-index place sharing #363

Closed Carifio24 closed 11 months ago

Carifio24 commented 11 months ago

This PR is to fix an issue noticed during a meeting yesterday. Currently when we share a place via URL, it can come in the either the form <collection name>.<index> or <constellation index>.<index>. Sharing places with the first form works fine, but using the constellation index form currently seems broken.

It looks like the reason for this is that we pass a not-defined all variable into the search service's getData method, which is used to look up these places (and which takes no arguments). This leads to an error and the constellation-based place finding not working. Looking into the git history, this is left over from the old signature of getData, which used to take an all flag argument. Making these change allows my local webclient to correctly load in places with the constellation-index form.

Share string for a test case: place=71.79 (an infrared Sagittarius image)

pkgw commented 11 months ago

Great, thanks! This sharing mechanism feels so fragile that I don't want to encourage anyone to use it, but it's still good to fix bugs where we can.