Skip to content

Commit

Permalink
🐛 Fix WCS recovering when widget is out of sight
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys authored and ManonMarchand committed Aug 1, 2024
1 parent 0f478c5 commit efc8e31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/models/event_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,12 @@ export default class EventHandler {
this.model.save_changes();
});

this.aladin.on("resizeChanged", () => {
this.aladin.on("resizeChanged", (width, height) => {
// Skip resize event when the div is hidden
if (width === 1 && height === 1) return;
this.updateWCS();
this.update2AxisFoV();
this.model.set("_height", height);
this.model.save_changes();
});

Expand Down

0 comments on commit efc8e31

Please sign in to comment.