Skip to content

Commit

Permalink
⬆️ Bump Aladin Lite to 3.4.5-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys committed Jul 18, 2024
1 parent 5f8e397 commit 7852773
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- monochromatic FITS images can be added to the view with `ipyaladin.Aladin.add_fits`.
The method accepts `astropy.io.fits.HDUList`, `pathlib.Path`, or `string` representing paths (#86)

### Changed

- Upgrade Aladin Lite version to 3.4.5-beta (#96)

## [0.4.0]

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Correspondence table between ipyaladin versions and Aladin Lite versions:

| ipyaladin | Aladin-Lite |
| --------- | ----------- |
| 0.4.0 | 3.4.4-beta |
| 0.4.0 | 3.4.5-beta |
| 0.3.0 | 3.3.3-dev |

> [!TIP]
Expand Down
2 changes: 1 addition & 1 deletion js/aladin_lite.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import A from "https://esm.sh/[email protected].4-beta";
import A from "https://esm.sh/[email protected].5-beta";

export default A;
16 changes: 8 additions & 8 deletions js/models/event_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ export default class EventHandler {
// fov MUST be cast into float in order to be sent to the model
this.model.set("_wcs", this.aladin.getViewWCS());
this.model.set("_fov", parseFloat(fov.toFixed(5)));
const fov_xy = this.aladin.getFov();
const twoAxisFoV = this.aladin.getFov();
this.model.set("_fov_xy", {
x: fov_xy[0],
y: fov_xy[1],
x: twoAxisFoV[0],
y: twoAxisFoV[1],
});
this.model.save_changes();
});
Expand Down Expand Up @@ -107,18 +107,18 @@ export default class EventHandler {
this.model.save_changes();
});

this.aladin.on("layerChanged", (_, layer) => {
if (layer !== "base") return;
this.aladin.on("layerChanged", (_, layerName, state) => {
if (layerName !== "base" || state !== "ADDED") 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();
const twoAxisFoV = this.aladin.getFov();
this.model.set("_fov_xy", {
x: fov_xy[0],
y: fov_xy[1],
x: twoAxisFoV[0],
y: twoAxisFoV[1],
});
this.model.save_changes();
});
Expand Down
6 changes: 3 additions & 3 deletions js/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ function initAladinLite(model, el) {
aladin.gotoRaDec(raDec[0], raDec[1]);

// Set current FoV and WCS
const FoV = aladin.getFov();
const twoAxisFoV = aladin.getFov();
model.set("_fov_xy", {
x: FoV[0],
y: FoV[1],
x: twoAxisFoV[0],
y: twoAxisFoV[1],
});
model.set("_wcs", aladin.getViewWCS());
model.save_changes();
Expand Down

0 comments on commit 7852773

Please sign in to comment.