Skip to content

Conversation

@bmatthieu3
Copy link
Collaborator

This is based on the first cleanup done in #150

This contains:

  • fix the documentation examples. overlays do correctly appear on the generated HTML static file because is its passed with traitlets instead of being sent with events.

current online documentation (no overlays are showed):

Capture d’écran 2025-08-27 à 17 10 22

now:

Capture d’écran 2025-08-27 à 17 09 04
  • if the user wants to export the aladin view to HTML, using embed_minimal_html from ipywidgets does recognize the add of overlays
    To export the aladin object to html through ipywidgets:
from ipywidgets.embed import embed_minimal_html

# drop_defaults is set to False because otherwise content of the widget's _esm is not put in the HTML
# See: https://github.com/manzt/anywidget/issues/339
embed_minimal_html('export.html', views=[aladin], drop_defaults=False)

This gives this html file with the table overlays correctly contained in it:
Capture d’écran 2025-08-27 à 17 15 08

  • add of colormap traitlet to replace the old event
  • fix: projection change through the UI now change the value of the python traitlet (aladin.projection)

@ManonMarchand
Copy link
Member

It works. My only remarks are:

  • the whole overlays are now stored in memory when before they were just sent and forgotten --> maybe this limits a bit the size of overlays (mostly MOCs and tables can get quite big) that we can print.
  • it looks like you wanted to allow programmatic deletion of the overlays in this PR. Is this the next step?

@ManonMarchand ManonMarchand linked an issue Oct 24, 2025 that may be closed by this pull request
@bmatthieu3
Copy link
Collaborator Author

the whole overlays are now stored in memory when before they were just sent and forgotten --> maybe this limits a bit the size of overlays (mostly MOCs and tables can get quite big) that we can print.

I am not sure if this can cause a real issue in practice. I think we should test loading a big MOC, fits image or catalog votable that is currently well handled in master and see if it is not in this branch. If there are problems we could maybe try evaluating the size of the overlay and send an event or not depending on it.
One thing is when exporting to HTML, the HTML will have the overlays encoded inside it which can lead to big html files. We just do that for compiling the docs and the doc examples do not load big overlays.

it looks like you wanted to allow programmatic deletion of the overlays in this PR. Is this the next step?

I think we should do that in another PR maybe ? on the JS side one can call https://cds-astro.github.io/aladin-lite/Aladin.html#removeOverlay with the name of overlay to remove.

bmatthieu3 and others added 5 commits November 21, 2025 08:30
* fix the documentation examples. overlays do correctly appear on the
generated HTML static file because is its passed with traitlets instead of
being sent with events.
* if the user want to export the aladin view to HTML, using embed_minimal_html from ipywidgets do recognize the add of overlays
* add of colormap traitlet to replace the old event
* bind projection change with the change on the python side (aladin.projection)
dependabot bot added 2 commits January 7, 2026 15:35
Bumps [vega-selections](https://github.com/vega/vega) from 5.6.0 to 5.6.3.
- [Release notes](https://github.com/vega/vega/releases)
- [Commits](https://github.com/vega/vega/commits)

---
updated-dependencies:
- dependency-name: vega-selections
  dependency-version: 5.6.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 5.23.14 to 5.27.14.
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](sebhildebrandt/systeminformation@v5.23.14...v5.27.14)

---
updated-dependencies:
- dependency-name: systeminformation
  dependency-version: 5.27.14
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export to JavaScript

3 participants