mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2025-12-24 12:05:42 -08:00
fix case where base layer is an ImageFITS. It was entering planet case because isPlanetaryBody is undefined which is !== false
This commit is contained in:
@@ -14,7 +14,7 @@ export let GenericPointer = (function (view, e) {
|
||||
let radec = view.wasm.screenToWorld(xymouse.x, xymouse.y);
|
||||
if (radec) {
|
||||
// sky case
|
||||
if (view.aladin.getBaseImageLayer().properties.isPlanetaryBody === false) {
|
||||
if (view.aladin.getBaseImageLayer().isPlanetaryBody() === false) {
|
||||
const queryRadius = Math.min(1, 15 * view.fov / view.largestDim);
|
||||
console.log('queryRadius "generic pointer": ', queryRadius);
|
||||
SimbadPointer.query(radec[0], radec[1], queryRadius, view.aladin);
|
||||
|
||||
@@ -242,6 +242,11 @@ export let ImageFITS = (function () {
|
||||
}
|
||||
};
|
||||
|
||||
// FITS images does not mean to be used for storing planetary data
|
||||
ImageFITS.prototype.isPlanetaryBody = function() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// @api
|
||||
ImageFITS.prototype.focusOn = function () {
|
||||
// ensure the fits have been parsed
|
||||
|
||||
@@ -370,6 +370,10 @@ export let ImageSurvey = (function () {
|
||||
}
|
||||
}
|
||||
|
||||
ImageSurvey.prototype.isPlanetaryBody = function() {
|
||||
return this.properties.isPlanetaryBody;
|
||||
}
|
||||
|
||||
// @api
|
||||
// TODO: include imgFormat inside the ImageSurvey's meta attribute
|
||||
ImageSurvey.prototype.setImageFormat = function (format) {
|
||||
|
||||
Reference in New Issue
Block a user