Skip to content

Commit

Permalink
✨ Add layerChanged listener for future AL version
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys committed Jul 16, 2024
1 parent c2618d1 commit 53dd798
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/models/event_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ export default class EventHandler {
this.model.save_changes();
});

this.aladin.on("layerChanged", (_, layer) => {
if (layer !== "base") return;
this.model.set("_wcs", this.aladin.getViewWCS());
this.model.save_changes();
});

this.aladin.on("resizeChanged", () => {
this.model.set("_wcs", this.aladin.getViewWCS());
const fov_xy = this.aladin.getFov();
Expand Down

0 comments on commit 53dd798

Please sign in to comment.