add tooltip with the projection name in the projection selector menu

This commit is contained in:
MARCHAND MANON
2023-09-05 11:17:59 +02:00
committed by Matthieu Baumann
parent 1ae4114360
commit 3b59abb36e
2 changed files with 20 additions and 20 deletions

View File

@@ -29,29 +29,29 @@
*****************************************************************************/
export let ProjectionEnum = {
// Zenithal
TAN: {id: 1, fov: 180}, /* Gnomonic projection */
STG: {id: 2, fov: 360}, /* Stereographic projection */
SIN: {id: 3, fov: 180}, /* Orthographic */
ZEA: {id: 4, fov: 360}, /* Equal-area */
FEYE: {id: 5, fov: 190},
AIR: {id: 6, fov: 360},
TAN: {id: 1, fov: 180, longName: "gnomonic"}, /* Gnomonic projection */
STG: {id: 2, fov: 360, longName: "stereographic"}, /* Stereographic projection */
SIN: {id: 3, fov: 180, longName: "orthographic"}, /* Orthographic */
ZEA: {id: 4, fov: 360, longName: "zenital equal-area"}, /* Equal-area */
FEYE: {id: 5, fov: 190, longName: "fish eye"},
AIR: {id: 6, fov: 360, longName: "airy"},
//AZP: {fov: 180},
ARC: {id: 7, fov: 360},
NCP: {id: 8, fov: 180},
ARC: {id: 7, fov: 360, longName: "zenital equidistant"},
NCP: {id: 8, fov: 180, longName: "north celestial pole"},
// Cylindrical
MER: {id: 9, fov: 360},
CAR: {id: 10, fov: 360},
CEA: {id: 11, fov: 360},
CYP: {id: 12, fov: 360},
MER: {id: 9, fov: 360, longName: "mercator"},
CAR: {id: 10, fov: 360, longName: "plate carrée"},
CEA: {id: 11, fov: 360, longName: "cylindrical equal area"},
CYP: {id: 12, fov: 360, longName: "cylindrical perspective"},
// Pseudo-cylindrical
AIT: {id: 13, fov: 360},
PAR: {id: 14, fov: 360},
SFL: {id: 15, fov: 360},
MOL: {id: 16, fov: 360},
AIT: {id: 13, fov: 360, longName: "hammer-aitoff"},
PAR: {id: 14, fov: 360, longName: "parabolic"},
SFL: {id: 15, fov: 360, longName: "sanson-flamsteed"},
MOL: {id: 16, fov: 360, longName: "mollweide"},
// Conic
COD: {id: 17, fov: 360},
COD: {id: 17, fov: 360, longName: "conic equidistant"},
// Hybrid
HPX: {id: 19, fov: 360},
HPX: {id: 19, fov: 360, longName: "healpix"},
};
export let projectionNames = [

View File

@@ -29,7 +29,7 @@
*****************************************************************************/
import { ALEvent } from "../events/ALEvent.js";
import { projectionNames } from "../ProjectionEnum.js";
import { projectionNames, ProjectionEnum } from "../ProjectionEnum.js";
import $ from 'jquery';
export class ProjectionSelector {
@@ -55,7 +55,7 @@
this.selectProjection.empty();
projectionNames.forEach(p => {
this.selectProjection.append($("<option />").val(p).text(p));
this.selectProjection.append($("<option />").val(p).text(p).attr("title", ProjectionEnum[p].longName));
});
let self = this;
this.selectProjection.change(function () {