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 baeed5d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
6 changes: 5 additions & 1 deletion 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 All @@ -41,7 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Change the jslink target trait from `target` to `shared_target` (#80)
- Change the jslink fov trait from `fov` to `shared_fov` (#83)
- Upgrade Aladin Lite version to 3.4.1-beta (#88)
- Upgrade Aladin Lite version to 3.4.4-beta (#88)
- Add support for list of strings in `add_overlay_from_stcs` (#88)

### Deprecated
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ Ipyaladin brings [Aladin Lite](https://github.com/cds-astro/aladin-lite) into no

Correspondence table between ipyaladin versions and Aladin Lite versions:

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

> [!TIP]
> This can always be read like so
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 baeed5d

Please sign in to comment.