Skip to content

Commit

Permalink
🐛 Update Aladin#getViewWCS to have RADESYS instead of RADECSYS that i…
Browse files Browse the repository at this point in the history
…s now deprecated for the fits standard
  • Loading branch information
Xen0Xys committed May 29, 2024
1 parent c881d1c commit 0bbf389
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/js/Aladin.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,31 @@ import { Polyline } from "./shapes/Polyline";
* @property {string} [backgroundColor="rgb(60, 60, 60)"] - Background color in RGB format.
*
* @property {boolean} [showZoomControl=false] - Whether to show the zoom control toolbar.
* This element belongs to the FoV UI thus its CSS class is `aladin-fov`
* This element belongs to the FoV UI thus its CSS class is `aladin-fov`
* @property {boolean} [showLayersControl=true] - Whether to show the layers control toolbar.
* CSS class for that button is `aladin-stack-control`
* CSS class for that button is `aladin-stack-control`
* @property {boolean} [expandLayersControl=false] - Whether to show the stack box opened at starting
* CSS class for the stack box is `aladin-stack-box`
* @property {boolean} [showFullscreenControl=true] - Whether to show the fullscreen control toolbar.
* CSS class for that button is `aladin-fullScreen-control`
* CSS class for that button is `aladin-fullScreen-control`
* @property {boolean} [showSimbadPointerControl=false] - Whether to show the Simbad pointer control toolbar.
* CSS class for that button is `aladin-simbadPointer-control`
* CSS class for that button is `aladin-simbadPointer-control`
* @property {boolean} [showCooGridControl=false] - Whether to show the coordinate grid control toolbar.
* CSS class for that button is `aladin-grid-control`
* CSS class for that button is `aladin-grid-control`
* @property {boolean} [showSettingsControl=false] - Whether to show the settings control toolbar.
* CSS class for that button is `aladin-settings-control`
* CSS class for that button is `aladin-settings-control`
* @property {boolean} [showShareControl=false] - Whether to show the share control toolbar.
* CSS class for that button is `aladin-share-control`
* CSS class for that button is `aladin-share-control`
* @property {boolean} [showStatusBar=true] - Whether to show the status bar. Enabled by default.
* CSS class for that button is `aladin-status-bar`
* CSS class for that button is `aladin-status-bar`
* @property {boolean} [showFrame=true] - Whether to show the viewport frame.
* CSS class for that button is `aladin-cooFrame`
* CSS class for that button is `aladin-cooFrame`
* @property {boolean} [showFov=true] - Whether to show the field of view indicator.
* CSS class for that button is `aladin-fov`
* CSS class for that button is `aladin-fov`
* @property {boolean} [showCooLocation=true] - Whether to show the coordinate location indicator.
* CSS class for that button is `aladin-location`
* CSS class for that button is `aladin-location`
* @property {boolean} [showProjectionControl=true] - Whether to show the projection control toolbar.
* CSS class for that button is `aladin-projection-control`
* CSS class for that button is `aladin-projection-control`
* @property {boolean} [showContextMenu=false] - Whether to show the context menu.
* @property {boolean} [showReticle=true] - Whether to show the reticle.
* @property {boolean} [showCatalog=true] - Whether to show the catalog.
Expand All @@ -123,20 +123,20 @@ import { Polyline } from "./shapes/Polyline";
* @property {boolean} [fullScreen=false] - Whether to start in full-screen mode.
* @property {string} [reticleColor="rgb(178, 50, 178)"] - Color of the reticle in RGB format.
* @property {number} [reticleSize=22] - Size of the reticle.
*
* @property {string} [gridColor="rgb(178, 50, 178)"] - Color of the grid in RGB format.
*
* @property {string} [gridColor="rgb(178, 50, 178)"] - Color of the grid in RGB format.
* Is overshadowed by gridOptions.color if defined.
* @property {number} [gridOpacity=0.8] - Opacity of the grid (0 to 1).
* @property {number} [gridOpacity=0.8] - Opacity of the grid (0 to 1).
* Is overshadowed by gridOptions.opacity if defined.
* @property {Object} [gridOptions] - More options for the grid.
* @property {string} [gridOptions.color="rgb(178, 50, 178)"] - Color of the grid. Can be specified as a named color
* @property {string} [gridOptions.color="rgb(178, 50, 178)"] - Color of the grid. Can be specified as a named color
* (see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/named-color| named colors}),
* as rgb (ex: "rgb(178, 50, 178)"), or as a hex color (ex: "#86D6AE").
* as rgb (ex: "rgb(178, 50, 178)"), or as a hex color (ex: "#86D6AE").
* @property {number} [gridOptions.thickness=2] - The thickness of the grid, in pixels.
* @property {number} [gridOptions.opacity=0.8] - Opacity of the grid and labels. It is comprised between 0 and 1.
* @property {boolean} [gridOptions.showLabels=true] - Whether the grid has labels.
* @property {number} [gridOptions.labelSize=15] - The font size of the labels.
*
*
* @property {string} [projection="SIN"] - Projection type. Can be 'SIN' for orthographic, 'MOL' for mollweide, 'AIT' for hammer-aitoff, 'ZEA' for zenital equal-area or 'MER' for mercator
* @property {boolean} [log=true] - Whether to log events.
* @property {boolean} [samp=false] - Whether to enable SAMP (Simple Application Messaging Protocol).
Expand Down Expand Up @@ -504,7 +504,7 @@ export let Aladin = (function () {
id: h.ID,
name: h.obs_title,
regime: h.obs_regime,
})
});
Expand Down Expand Up @@ -1499,9 +1499,9 @@ export let Aladin = (function () {

/**
* Remove a overlay by its layer name
*
*
* @memberof Aladin
* @param {string} layer
* @param {string} layer
*/
Aladin.prototype.removeOverlay = function (layer) {
this.view.removeLayer(layer);
Expand Down Expand Up @@ -1986,7 +1986,7 @@ aladin.on("positionChanged", ({ra, dec}) => {

/**
* Select specific objects in the view
*
*
* @memberof Aladin
* @param {?Array.<Source, Footprint, Circle, Ellipse, Polyline, Line>} objects - If null is passed then nothing will be selected and sources already selected will be deselected
*/
Expand Down Expand Up @@ -2226,7 +2226,7 @@ aladin.on("positionChanged", ({ra, dec}) => {
let cooType2 = "LAT--";

// just in case it would be equatorial
let radecsys;
let radesys;

if (this.getBaseImageLayer().isPlanetaryBody()) {
const body = this.getBaseImageLayer().hipsBody;
Expand All @@ -2240,7 +2240,7 @@ aladin.on("positionChanged", ({ra, dec}) => {
case "J2000d":
cooType1 = "RA---";
cooType2 = "DEC--";
radecsys = "ICRS ";
radesys = "ICRS ";
break;
case "Galactic":
cooType1 = "GLON-";
Expand All @@ -2266,7 +2266,7 @@ aladin.on("positionChanged", ({ra, dec}) => {

// handle the case of equatorial coordinates that need
// the radecsys keyword
if (radecsys == "ICRS ") WCS.RADECSYS = radecsys;
if (radesys == "ICRS ") WCS.RADESYS = radesys;

return WCS;
};
Expand Down Expand Up @@ -2353,7 +2353,7 @@ aladin.on("positionChanged", ({ra, dec}) => {
if (frame instanceof string) {
frame = CooFrameEnum.fromString(frame, CooFrameEnum.J2000);
}

if (frame.label == CooFrameEnum.SYSTEMS.GAL) {
frame = Aladin.wasmLibs.core.CooSystem.GAL;
}
Expand Down

0 comments on commit 0bbf389

Please sign in to comment.