mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2026-03-12 21:23:10 -07:00
colorpicker valid tooltip
This commit is contained in:
committed by
Matthieu Baumann
parent
fe18121e54
commit
796603596d
@@ -19,8 +19,6 @@
|
||||
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript" src="https://aladin.cds.unistra.fr/AladinLite/api/v3/latest/aladin.js" charset="utf-8"></script>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
let aladin;
|
||||
@@ -39,8 +37,8 @@
|
||||
<!-- fin temporaire gestion cercle -->
|
||||
|
||||
<b>Orientation</b><br>
|
||||
<button id="hips-coronelli" class="pure-button" name="ref-hips" onclick="aladin.setImageSurvey('Coronelli');">Normal</button><br>
|
||||
<button id="hips-illenoroc" class="pure-button" name="ref-hips" onclick="aladin.setImageSurvey('illenoroC');">Inversé</button>
|
||||
<button id="hips-coronelli" class="pure-button" name="ref-hips" onclick="aladin.reverseLongitude(false)">Normal</button><br>
|
||||
<button id="hips-illenoroc" class="pure-button" name="ref-hips" onclick="aladin.reverseLongitude(true);">Inversé</button>
|
||||
<br><br>
|
||||
|
||||
<b>Constellations</b>
|
||||
@@ -242,17 +240,15 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
//import A from '../src/js/A.js';
|
||||
//import {Utils} from '../src/js/Utils';
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
import {Utils} from '../src/js/Utils';
|
||||
|
||||
A.init.then(() => {
|
||||
var hipsDir="http://alasky.cds.unistra.fr/CDS_P_Coronelli";
|
||||
aladin = A.aladin("#aladin-lite-div", {showSimbadPointerControl: true, lockNorthUp: true, realFullscreen: true, fov: 100, allowFullZoomout: true, showReticle: false });
|
||||
aladin.createImageSurvey('Coronelli', 'Coronelli', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: true, minOrder: 3});
|
||||
aladin.createImageSurvey('illenoroC', 'illenoroC', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: false, minOrder: 3});
|
||||
aladin.setImageSurvey('illenoroC');
|
||||
|
||||
aladin = A.aladin("#aladin-lite-div", {showSimbadPointerControl: true, lockNorthUp: true, reverseLongitude: true, realFullscreen: true, fov: 100, allowFullZoomout: true, showReticle: false });
|
||||
aladin.createImageSurvey('Coronelli', 'Coronelli', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', minOrder: 3});
|
||||
aladin.setImageSurvey('Coronelli')
|
||||
$('#layersControlLeft').show();
|
||||
$('#layersCL2').show();
|
||||
$('#layersControlRight').show();
|
||||
|
||||
@@ -224,6 +224,8 @@ impl CameraViewPort {
|
||||
self.view_hpx_cells.get_cells(depth, frame)
|
||||
}
|
||||
|
||||
// This method has the role to determine the render mode based on the fov
|
||||
// For large FoV, raytracing drawing mode, rasterizer otherwise
|
||||
pub fn is_raytracing(&self, proj: &ProjectionType) -> bool {
|
||||
// Check whether the tile depth is 0 for square projection
|
||||
// definition domains i.e. Mercator
|
||||
@@ -240,6 +242,7 @@ impl CameraViewPort {
|
||||
ProjectionType::Ait(_) => self.aperture >= 100.0_f64.to_radians(),
|
||||
ProjectionType::Mol(_) => self.aperture >= 100.0_f64.to_radians(),
|
||||
ProjectionType::Zea(_) => self.aperture >= 140.0_f64.to_radians(),
|
||||
_ => self.aperture >= 140.0_f64.to_radians(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ impl WebClient {
|
||||
"ZEA" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Zea(mapproj::zenithal::zea::Zea::new())), /* Equal-area */
|
||||
/*"FEYE" => self
|
||||
"FEYE" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Feye(mapproj::zenithal::feye::Feye::new())),
|
||||
"AIR" => {
|
||||
@@ -239,19 +239,19 @@ impl WebClient {
|
||||
//air_proj.set_n_iter(10);
|
||||
//air_proj.set_eps(1e-12);
|
||||
self.app.set_projection(ProjectionType::Air(air_proj))
|
||||
}*/
|
||||
}
|
||||
//"AZP",
|
||||
/*"ARC" => self
|
||||
"ARC" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Arc(mapproj::zenithal::arc::Arc::new())),
|
||||
"NCP" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Ncp(mapproj::zenithal::ncp::Ncp::new())),*/
|
||||
.set_projection(ProjectionType::Ncp(mapproj::zenithal::ncp::Ncp::new())),
|
||||
// Cylindrical
|
||||
"MER" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Mer(mapproj::cylindrical::mer::Mer::new())),
|
||||
/*"CAR" => self
|
||||
"CAR" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Car(mapproj::cylindrical::car::Car::new())),
|
||||
"CEA" => self
|
||||
@@ -259,17 +259,17 @@ impl WebClient {
|
||||
.set_projection(ProjectionType::Cea(mapproj::cylindrical::cea::Cea::new())),
|
||||
"CYP" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Cyp(mapproj::cylindrical::cyp::Cyp::new())),*/
|
||||
.set_projection(ProjectionType::Cyp(mapproj::cylindrical::cyp::Cyp::new())),
|
||||
// Pseudo-cylindrical
|
||||
"AIT" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Ait(mapproj::pseudocyl::ait::Ait::new())),
|
||||
/*"PAR" => self
|
||||
"PAR" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Par(mapproj::pseudocyl::par::Par::new())),
|
||||
"SFL" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Sfl(mapproj::pseudocyl::sfl::Sfl::new())),*/
|
||||
.set_projection(ProjectionType::Sfl(mapproj::pseudocyl::sfl::Sfl::new())),
|
||||
"MOL" => {
|
||||
let mut mol_proj = mapproj::pseudocyl::mol::Mol::new();
|
||||
mol_proj.set_n_iter(10);
|
||||
@@ -277,13 +277,13 @@ impl WebClient {
|
||||
|
||||
self.app.set_projection(ProjectionType::Mol(mol_proj))
|
||||
} // Conic
|
||||
/*"COD" => self
|
||||
"COD" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Cod(mapproj::conic::cod::Cod::new())),
|
||||
// Hybrid
|
||||
"HPX" => self
|
||||
.app
|
||||
.set_projection(ProjectionType::Hpx(mapproj::hybrid::hpx::Hpx::new())),*/
|
||||
.set_projection(ProjectionType::Hpx(mapproj::hybrid::hpx::Hpx::new())),
|
||||
_ => Err(JsValue::from_str(
|
||||
"Not a valid projection name. AIT, ZEA, SIN, STG, TAN, MOL and MER are accepted",
|
||||
)),
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
// World space
|
||||
use crate::camera::CameraViewPort;
|
||||
use crate::domain::sdf::ProjDefType;
|
||||
use crate::math::rotation::Rotation;
|
||||
|
||||
use coo_space::XYZModel;
|
||||
//use crate::num_traits::FloatConst;
|
||||
@@ -22,7 +23,7 @@ pub mod domain;
|
||||
use crate::math::angle::ToAngle;
|
||||
|
||||
use crate::math::angle::Angle;
|
||||
use domain::{basic, full::FullScreen};
|
||||
use domain::{basic, cod::Cod, full::FullScreen, hpx::Hpx, par::Par};
|
||||
/* S <-> NDC space conversion methods */
|
||||
pub fn screen_to_ndc_space(
|
||||
pos_screen_space: &XYScreen<f64>,
|
||||
@@ -114,15 +115,15 @@ pub enum ProjectionType {
|
||||
/* ZEA, Equal-area */
|
||||
Zea(mapproj::zenithal::zea::Zea),
|
||||
/* FEYE, Fish-eyes */
|
||||
//Feye(mapproj::zenithal::feye::Feye),
|
||||
Feye(mapproj::zenithal::feye::Feye),
|
||||
/* AIR, */
|
||||
//Air(mapproj::zenithal::air::Air),
|
||||
Air(mapproj::zenithal::air::Air),
|
||||
//AZP: {fov: 180},
|
||||
//Azp(mapproj::zenithal::azp::Azp),
|
||||
/* ARC, */
|
||||
//Arc(mapproj::zenithal::arc::Arc),
|
||||
Arc(mapproj::zenithal::arc::Arc),
|
||||
/* NCP, */
|
||||
//Ncp(mapproj::zenithal::ncp::Ncp),
|
||||
Ncp(mapproj::zenithal::ncp::Ncp),
|
||||
|
||||
// Pseudo-cylindrical projections
|
||||
/* AIT, Aitoff */
|
||||
@@ -130,26 +131,26 @@ pub enum ProjectionType {
|
||||
// MOL, Mollweide */
|
||||
Mol(mapproj::pseudocyl::mol::Mol),
|
||||
// PAR, */
|
||||
//Par(mapproj::pseudocyl::par::Par),
|
||||
Par(mapproj::pseudocyl::par::Par),
|
||||
// SFL, */
|
||||
//Sfl(mapproj::pseudocyl::sfl::Sfl),
|
||||
Sfl(mapproj::pseudocyl::sfl::Sfl),
|
||||
|
||||
// Cylindrical projections
|
||||
// MER, Mercator */
|
||||
Mer(mapproj::cylindrical::mer::Mer),
|
||||
// CAR, */
|
||||
//Car(mapproj::cylindrical::car::Car),
|
||||
Car(mapproj::cylindrical::car::Car),
|
||||
// CEA, */
|
||||
//Cea(mapproj::cylindrical::cea::Cea),
|
||||
Cea(mapproj::cylindrical::cea::Cea),
|
||||
// CYP, */
|
||||
//Cyp(mapproj::cylindrical::cyp::Cyp),
|
||||
Cyp(mapproj::cylindrical::cyp::Cyp),
|
||||
|
||||
// Conic projections
|
||||
// COD, */
|
||||
//Cod(mapproj::conic::cod::Cod),
|
||||
Cod(mapproj::conic::cod::Cod),
|
||||
|
||||
// HEALPix hybrid projection
|
||||
//Hpx(mapproj::hybrid::hpx::Hpx),
|
||||
Hpx(mapproj::hybrid::hpx::Hpx),
|
||||
}
|
||||
|
||||
use crate::math::lonlat::LonLat;
|
||||
@@ -305,38 +306,38 @@ impl ProjectionType {
|
||||
/* ZEA, Equal-area */
|
||||
ProjectionType::Zea(_) => 1.0,
|
||||
/* FEYE, Fish-eyes */
|
||||
//ProjectionType::Feye(_) => 1.0,
|
||||
ProjectionType::Feye(_) => 1.0,
|
||||
/* AIR, */
|
||||
//ProjectionType::Air(_) => 1.0,
|
||||
ProjectionType::Air(_) => 1.0,
|
||||
//AZP: {fov: 180},
|
||||
//Azp(mapproj::zenithal::azp::Azp),
|
||||
/* ARC, */
|
||||
//ProjectionType::Arc(_) => 1.0,
|
||||
ProjectionType::Arc(_) => 1.0,
|
||||
/* NCP, */
|
||||
//ProjectionType::Ncp(_) => 1.0,
|
||||
ProjectionType::Ncp(_) => 1.0,
|
||||
// Pseudo-cylindrical projections
|
||||
/* AIT, Aitoff */
|
||||
ProjectionType::Ait(_) => 2.0,
|
||||
// MOL, Mollweide */
|
||||
ProjectionType::Mol(_) => 2.0,
|
||||
// PAR, */
|
||||
//ProjectionType::Par(_) => 2.0,
|
||||
ProjectionType::Par(_) => 2.0,
|
||||
// SFL, */
|
||||
//ProjectionType::Sfl(_) => 2.0,
|
||||
ProjectionType::Sfl(_) => 2.0,
|
||||
// Cylindrical projections
|
||||
// MER, Mercator */
|
||||
ProjectionType::Mer(_) => 1.0,
|
||||
// CAR, */
|
||||
//ProjectionType::Car(_) => 1.0,
|
||||
ProjectionType::Car(_) => 1.0,
|
||||
// CEA, */
|
||||
//ProjectionType::Cea(_) => 1.0,
|
||||
ProjectionType::Cea(_) => 1.0,
|
||||
// CYP, */
|
||||
//ProjectionType::Cyp(_) => 1.0,
|
||||
ProjectionType::Cyp(_) => 1.0,
|
||||
// Conic projections
|
||||
// COD, */
|
||||
//ProjectionType::Cod(_) => 1.0,
|
||||
ProjectionType::Cod(_) => 1.0,
|
||||
// HEALPix hybrid projection
|
||||
//ProjectionType::Hpx(_) => 2.0,
|
||||
ProjectionType::Hpx(_) => 2.0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,15 +353,15 @@ impl ProjectionType {
|
||||
/* ZEA, Equal-area */
|
||||
ProjectionType::Zea(_) => 359.9_f64.to_radians().to_angle(),
|
||||
/* FEYE, Fish-eyes */
|
||||
//ProjectionType::Feye(_) => 190.0,
|
||||
ProjectionType::Feye(_) => 190.0_f64.to_radians().to_angle(),
|
||||
/* AIR, */
|
||||
//ProjectionType::Air(_) => 360.0,
|
||||
ProjectionType::Air(_) => 360.0_f64.to_radians().to_angle(),
|
||||
//AZP: {fov: 180},
|
||||
//Azp(mapproj::zenithal::azp::Azp),
|
||||
//ProjectionType::Azp(mapproj::zenithal::azp::Azp),
|
||||
/* ARC, */
|
||||
//ProjectionType::Arc(_) => 360.0,
|
||||
ProjectionType::Arc(_) => 360.0_f64.to_radians().to_angle(),
|
||||
/* NCP, */
|
||||
//ProjectionType::Ncp(_) => 180.0,
|
||||
ProjectionType::Ncp(_) => 180.0_f64.to_radians().to_angle(),
|
||||
|
||||
// Pseudo-cylindrical projections
|
||||
/* AIT, Aitoff */
|
||||
@@ -368,26 +369,26 @@ impl ProjectionType {
|
||||
// MOL, Mollweide */
|
||||
ProjectionType::Mol(_) => 360.0_f64.to_radians().to_angle(),
|
||||
// PAR, */
|
||||
//ProjectionType::Par(_) => 360.0,
|
||||
ProjectionType::Par(_) => 360.0_f64.to_radians().to_angle(),
|
||||
// SFL, */
|
||||
//ProjectionType::Sfl(_) => 360.0,
|
||||
ProjectionType::Sfl(_) => 360.0_f64.to_radians().to_angle(),
|
||||
|
||||
// Cylindrical projections
|
||||
// MER, Mercator */
|
||||
ProjectionType::Mer(_) => 360.0_f64.to_radians().to_angle(),
|
||||
// CAR, */
|
||||
//ProjectionType::Car(_) => 360.0,
|
||||
ProjectionType::Car(_) => 360.0_f64.to_radians().to_angle(),
|
||||
// CEA, */
|
||||
//ProjectionType::Cea(_) => 360.0,
|
||||
ProjectionType::Cea(_) => 360.0_f64.to_radians().to_angle(),
|
||||
// CYP, */
|
||||
//ProjectionType::Cyp(_) => 360.0,
|
||||
ProjectionType::Cyp(_) => 360.0_f64.to_radians().to_angle(),
|
||||
|
||||
// Conic projections
|
||||
// COD, */
|
||||
//ProjectionType::Cod(_) => 330.0,
|
||||
ProjectionType::Cod(_) => 330.0_f64.to_radians().to_angle(),
|
||||
|
||||
// HEALPix hybrid projection
|
||||
//ProjectionType::Hpx(_) => 360.0,
|
||||
ProjectionType::Hpx(_) => 360.0_f64.to_radians().to_angle(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,27 +416,27 @@ impl ProjectionType {
|
||||
&DISK
|
||||
}
|
||||
/* FEYE, Fish-eyes */
|
||||
/*ProjectionType::Feye(_) => {
|
||||
ProjectionType::Feye(_) => {
|
||||
const DISK: ProjDefType = ProjDefType::Disk(basic::disk::Disk { radius: 1.0 });
|
||||
&DISK
|
||||
}*/
|
||||
}
|
||||
/* AIR, */
|
||||
/*ProjectionType::Air(_) => {
|
||||
ProjectionType::Air(_) => {
|
||||
const DISK: ProjDefType = ProjDefType::FullScreen(FullScreen);
|
||||
&DISK
|
||||
}*/
|
||||
}
|
||||
//AZP: {fov: 180},
|
||||
//Azp(mapproj::zenithal::azp::Azp),
|
||||
/* ARC, */
|
||||
/*ProjectionType::Arc(_) => {
|
||||
ProjectionType::Arc(_) => {
|
||||
const DISK: ProjDefType = ProjDefType::Disk(basic::disk::Disk { radius: 1.0 });
|
||||
&DISK
|
||||
}*/
|
||||
}
|
||||
/* NCP, */
|
||||
/*ProjectionType::Ncp(_) => {
|
||||
ProjectionType::Ncp(_) => {
|
||||
const DISK: ProjDefType = ProjDefType::Disk(basic::disk::Disk { radius: 1.0 });
|
||||
&DISK
|
||||
}*/
|
||||
}
|
||||
|
||||
// Pseudo-cylindrical projections
|
||||
/* AIT, Aitoff */
|
||||
@@ -449,15 +450,15 @@ impl ProjectionType {
|
||||
&ELLIPSE
|
||||
}
|
||||
// PAR, */
|
||||
/*ProjectionType::Par(_) => {
|
||||
ProjectionType::Par(_) => {
|
||||
const PAR: ProjDefType = ProjDefType::Par(Par);
|
||||
&PAR
|
||||
}*/
|
||||
}
|
||||
// SFL, */
|
||||
/*ProjectionType::Sfl(_) => {
|
||||
ProjectionType::Sfl(_) => {
|
||||
const PAR: ProjDefType = ProjDefType::Par(Par);
|
||||
&PAR
|
||||
}*/
|
||||
}
|
||||
|
||||
// Cylindrical projections
|
||||
// MER, Mercator */
|
||||
@@ -465,32 +466,32 @@ impl ProjectionType {
|
||||
const FULL_SCREEN: ProjDefType = ProjDefType::FullScreen(FullScreen);
|
||||
&FULL_SCREEN
|
||||
} // CAR, */
|
||||
/*ProjectionType::Car(_) => {
|
||||
const FULL_SCREEN: ProjDefType = ProjDefType::FullScreen(FullScreen);
|
||||
&FULL_SCREEN
|
||||
}*/
|
||||
// CEA, */
|
||||
/*ProjectionType::Cea(_) => {
|
||||
const FULL_SCREEN: ProjDefType = ProjDefType::FullScreen(FullScreen);
|
||||
&FULL_SCREEN
|
||||
}*/
|
||||
// CYP, */
|
||||
/*ProjectionType::Cyp(_) => {
|
||||
const FULL_SCREEN: ProjDefType = ProjDefType::FullScreen(FullScreen);
|
||||
&FULL_SCREEN
|
||||
}*/
|
||||
ProjectionType::Car(_) => {
|
||||
const FULL_SCREEN: ProjDefType = ProjDefType::FullScreen(FullScreen);
|
||||
&FULL_SCREEN
|
||||
}
|
||||
// CEA, */
|
||||
ProjectionType::Cea(_) => {
|
||||
const FULL_SCREEN: ProjDefType = ProjDefType::FullScreen(FullScreen);
|
||||
&FULL_SCREEN
|
||||
}
|
||||
// CYP, */
|
||||
ProjectionType::Cyp(_) => {
|
||||
const FULL_SCREEN: ProjDefType = ProjDefType::FullScreen(FullScreen);
|
||||
&FULL_SCREEN
|
||||
}
|
||||
|
||||
// Conic projections
|
||||
// COD, */
|
||||
/*ProjectionType::Cod(_) => {
|
||||
const CONIC: ProjDefType = ProjDefType::Cod(Cod::new());
|
||||
&CONIC
|
||||
}*/
|
||||
// HEALPix hybrid projection
|
||||
/*ProjectionType::Hpx(_) => {
|
||||
const HPX_DEF_REG: ProjDefType = ProjDefType::Hpx(Hpx);
|
||||
&HPX_DEF_REG
|
||||
}*/
|
||||
// Conic projections
|
||||
// COD, */
|
||||
ProjectionType::Cod(_) => {
|
||||
const CONIC: ProjDefType = ProjDefType::Cod(Cod::new());
|
||||
&CONIC
|
||||
}
|
||||
// HEALPix hybrid projection
|
||||
ProjectionType::Hpx(_) => {
|
||||
const HPX_DEF_REG: ProjDefType = ProjDefType::Hpx(Hpx);
|
||||
&HPX_DEF_REG
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -509,15 +510,15 @@ impl Projection for ProjectionType {
|
||||
/* ZEA, Equal-area */
|
||||
ProjectionType::Zea(zea) => zea.clip_to_world_space(xy),
|
||||
/* FEYE, Fish-eyes */
|
||||
//ProjectionType::Feye(feye) => feye.clip_to_world_space(xy),
|
||||
ProjectionType::Feye(feye) => feye.clip_to_world_space(xy),
|
||||
/* AIR, */
|
||||
//ProjectionType::Air(air) => air.clip_to_world_space(xy),
|
||||
ProjectionType::Air(air) => air.clip_to_world_space(xy),
|
||||
//AZP: {fov: 180},
|
||||
//Azp(mapproj::zenithal::azp::Azp),
|
||||
/* ARC, */
|
||||
//ProjectionType::Arc(arc) => arc.clip_to_world_space(xy),
|
||||
ProjectionType::Arc(arc) => arc.clip_to_world_space(xy),
|
||||
/* NCP, */
|
||||
//ProjectionType::Ncp(ncp) => ncp.clip_to_world_space(xy),
|
||||
ProjectionType::Ncp(ncp) => ncp.clip_to_world_space(xy),
|
||||
|
||||
// Pseudo-cylindrical projections
|
||||
/* AIT, Aitoff */
|
||||
@@ -525,30 +526,34 @@ impl Projection for ProjectionType {
|
||||
// MOL, Mollweide */
|
||||
ProjectionType::Mol(mol) => mol.clip_to_world_space(xy),
|
||||
// PAR, */
|
||||
//ProjectionType::Par(par) => par.clip_to_world_space(xy),
|
||||
ProjectionType::Par(par) => par.clip_to_world_space(xy),
|
||||
// SFL, */
|
||||
//ProjectionType::Sfl(sfl) => sfl.clip_to_world_space(xy),
|
||||
ProjectionType::Sfl(sfl) => sfl.clip_to_world_space(xy),
|
||||
|
||||
// Cylindrical projections
|
||||
// MER, Mercator */
|
||||
ProjectionType::Mer(mer) => mer.clip_to_world_space(xy),
|
||||
// CAR, */
|
||||
//ProjectionType::Car(car) => car.clip_to_world_space(xy),
|
||||
ProjectionType::Car(car) => car.clip_to_world_space(xy),
|
||||
// CEA, */
|
||||
//ProjectionType::Cea(cea) => cea.clip_to_world_space(xy),
|
||||
ProjectionType::Cea(cea) => cea.clip_to_world_space(xy),
|
||||
// CYP, */
|
||||
//ProjectionType::Cyp(cyp) => cyp.clip_to_world_space(xy),
|
||||
ProjectionType::Cyp(cyp) => cyp.clip_to_world_space(xy),
|
||||
|
||||
// Conic projections
|
||||
// COD, */
|
||||
/*ProjectionType::Cod(cod) => cod.clip_to_world_space(xy).map(|xyz| {
|
||||
ProjectionType::Cod(cod) => cod.clip_to_world_space(xy).map(|xyz| {
|
||||
let rot = Rotation::from_sky_position(
|
||||
&LonLatT::new(0.0_f64.to_angle(), (HALF_PI * 0.5).to_angle()).vector(),
|
||||
&LonLatT::new(
|
||||
0.0_f64.to_angle(),
|
||||
(mapproj::math::HALF_PI * 0.5).to_angle(),
|
||||
)
|
||||
.vector(),
|
||||
);
|
||||
rot.inv_rotate(&xyz)
|
||||
}),*/
|
||||
}),
|
||||
// HEALPix hybrid projection
|
||||
//ProjectionType::Hpx(hpx) => hpx.clip_to_world_space(xy),
|
||||
ProjectionType::Hpx(hpx) => hpx.clip_to_world_space(xy),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,15 +570,15 @@ impl Projection for ProjectionType {
|
||||
/* ZEA, Equal-area */
|
||||
ProjectionType::Zea(zea) => zea.world_to_clip_space(xyz),
|
||||
/* FEYE, Fish-eyes */
|
||||
//ProjectionType::Feye(feye) => feye.world_to_clip_space(xyz),
|
||||
ProjectionType::Feye(feye) => feye.world_to_clip_space(xyz),
|
||||
/* AIR, */
|
||||
//ProjectionType::Air(air) => air.world_to_clip_space(xyz),
|
||||
ProjectionType::Air(air) => air.world_to_clip_space(xyz),
|
||||
//AZP: {fov: 180},
|
||||
//Azp(mapproj::zenithal::azp::Azp),
|
||||
/* ARC, */
|
||||
//ProjectionType::Arc(arc) => arc.world_to_clip_space(xyz),
|
||||
ProjectionType::Arc(arc) => arc.world_to_clip_space(xyz),
|
||||
/* NCP, */
|
||||
//ProjectionType::Ncp(ncp) => ncp.world_to_clip_space(xyz),
|
||||
ProjectionType::Ncp(ncp) => ncp.world_to_clip_space(xyz),
|
||||
|
||||
// Pseudo-cylindrical projections
|
||||
/* AIT, Aitoff */
|
||||
@@ -581,30 +586,34 @@ impl Projection for ProjectionType {
|
||||
// MOL, Mollweide */
|
||||
ProjectionType::Mol(mol) => mol.world_to_clip_space(xyz),
|
||||
// PAR, */
|
||||
//ProjectionType::Par(par) => par.world_to_clip_space(xyz),
|
||||
ProjectionType::Par(par) => par.world_to_clip_space(xyz),
|
||||
// SFL, */
|
||||
//ProjectionType::Sfl(sfl) => sfl.world_to_clip_space(xyz),
|
||||
ProjectionType::Sfl(sfl) => sfl.world_to_clip_space(xyz),
|
||||
|
||||
// Cylindrical projections
|
||||
// MER, Mercator */
|
||||
ProjectionType::Mer(mer) => mer.world_to_clip_space(xyz),
|
||||
// CAR, */
|
||||
//ProjectionType::Car(car) => car.world_to_clip_space(xyz),
|
||||
ProjectionType::Car(car) => car.world_to_clip_space(xyz),
|
||||
// CEA, */
|
||||
//ProjectionType::Cea(cea) => cea.world_to_clip_space(xyz),
|
||||
ProjectionType::Cea(cea) => cea.world_to_clip_space(xyz),
|
||||
// CYP, */
|
||||
//ProjectionType::Cyp(cyp) => cyp.world_to_clip_space(xyz),
|
||||
ProjectionType::Cyp(cyp) => cyp.world_to_clip_space(xyz),
|
||||
// Conic projections
|
||||
// COD, */
|
||||
/*ProjectionType::Cod(cod) => {
|
||||
ProjectionType::Cod(cod) => {
|
||||
// The Cod projection is centered on (0, 45 deg)
|
||||
let rot = Rotation::from_sky_position(
|
||||
&LonLatT::new(0.0_f64.to_angle(), (HALF_PI * 0.5).to_angle()).vector(),
|
||||
&LonLatT::new(
|
||||
0.0_f64.to_angle(),
|
||||
(mapproj::math::HALF_PI * 0.5).to_angle(),
|
||||
)
|
||||
.vector(),
|
||||
);
|
||||
cod.world_to_clip_space(&rot.rotate(&xyz))
|
||||
}*/
|
||||
}
|
||||
// HEALPix hybrid projection
|
||||
//ProjectionType::Hpx(hpx) => hpx.world_to_clip_space(xyz),
|
||||
ProjectionType::Hpx(hpx) => hpx.world_to_clip_space(xyz),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -634,6 +643,7 @@ impl UniformType for ProjectionType {
|
||||
// Cylindrical projections
|
||||
// MER, Mercator */
|
||||
ProjectionType::Mer(_) => gl.uniform1i(location, 6),
|
||||
_ => gl.uniform1i(location, 6),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -808,7 +818,7 @@ mod tests {
|
||||
"./../img/zea.jpg",
|
||||
ProjectionType::Zea(mapproj::zenithal::zea::Zea),
|
||||
);
|
||||
/*generate_projection_map(
|
||||
generate_projection_map(
|
||||
"./../img/feye.png",
|
||||
ProjectionType::Feye(mapproj::zenithal::feye::Feye),
|
||||
);
|
||||
@@ -823,14 +833,14 @@ mod tests {
|
||||
generate_projection_map(
|
||||
"./../img/air.png",
|
||||
ProjectionType::Air(mapproj::zenithal::air::Air::new()),
|
||||
);*/
|
||||
);
|
||||
|
||||
// Cylindrical
|
||||
generate_projection_map(
|
||||
"./../img/mer.jpg",
|
||||
ProjectionType::Mer(mapproj::cylindrical::mer::Mer),
|
||||
);
|
||||
/*generate_projection_map(
|
||||
generate_projection_map(
|
||||
"./../img/car.png",
|
||||
ProjectionType::Car(mapproj::cylindrical::car::Car),
|
||||
);
|
||||
@@ -841,26 +851,26 @@ mod tests {
|
||||
generate_projection_map(
|
||||
"./../img/cyp.png",
|
||||
ProjectionType::Cyp(mapproj::cylindrical::cyp::Cyp::new()),
|
||||
);*/
|
||||
);
|
||||
// Pseudo-cylindrical
|
||||
generate_projection_map(
|
||||
"./../img/ait.jpg",
|
||||
ProjectionType::Ait(mapproj::pseudocyl::ait::Ait),
|
||||
);
|
||||
/*generate_projection_map(
|
||||
generate_projection_map(
|
||||
"./../img/car.png",
|
||||
ProjectionType::Par(mapproj::pseudocyl::par::Par),
|
||||
);
|
||||
generate_projection_map(
|
||||
"./../img/cea.png",
|
||||
ProjectionType::Sfl(mapproj::pseudocyl::sfl::Sfl),
|
||||
);*/
|
||||
);
|
||||
generate_projection_map(
|
||||
"./../img/mol.jpg",
|
||||
ProjectionType::Mol(mapproj::pseudocyl::mol::Mol::new()),
|
||||
);
|
||||
// Conic
|
||||
/*generate_projection_map(
|
||||
generate_projection_map(
|
||||
"./../img/cod.png",
|
||||
ProjectionType::Cod(mapproj::conic::cod::Cod::new()),
|
||||
);
|
||||
@@ -868,6 +878,6 @@ mod tests {
|
||||
generate_projection_map(
|
||||
"./../img/hpx.png",
|
||||
ProjectionType::Hpx(mapproj::hybrid::hpx::Hpx),
|
||||
);*/
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -627,10 +627,6 @@
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.aladin-form-group > * {
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.aladin-form-group > *:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@@ -1147,12 +1143,13 @@ otherwise it fits its content options. If those are too big the select can go ou
|
||||
*/
|
||||
|
||||
.aladin-indicator {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
margin: 0 5px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
margin: 0 5px;
|
||||
vertical-align: middle;
|
||||
border: var(--border-size) solid var(--border-color);
|
||||
}
|
||||
|
||||
.aladin-indicator.aladin-not-found {
|
||||
|
||||
@@ -904,7 +904,7 @@ A.catalogFromSkyBot = function (ra, dec, radius, epoch, queryOptions, options, s
|
||||
* @param {function} [options.action] - The callback function to execute when the button is clicked.
|
||||
* @param {string} [options.title] - The title attribute for the button.
|
||||
* @param {Object} [options.icon] - An icon object for the button.
|
||||
* @param {boolean} [options.disable=false] - Whether the button is initially disabled.
|
||||
* @param {boolean} [options.disabled=false] - Whether the button is initially disabled.
|
||||
* @param {HTMLElement|string|Widget} [options.content] - The content to be added to the button.
|
||||
* @param {CSSStyleSheet} [options.cssStyle] - The CSS styles to apply to the button.
|
||||
* @param {Object} [options.tooltip] - A tooltip.
|
||||
|
||||
@@ -34,20 +34,20 @@ export let ProjectionEnum = {
|
||||
SIN: {id: 3, label: "Spheric"}, /* Orthographic */
|
||||
// TODO: fix why the projection disappears at fov = 360.0
|
||||
ZEA: {id: 4, label: "Zenital equal-area"}, /* Equal-area */
|
||||
//FEYE: {id: 5, fov: 190, label: "fish eye"},
|
||||
//AIR: {id: 6, fov: 360, label: "airy"},
|
||||
/*FEYE: {id: 5, fov: 190, label: "fish eye"},
|
||||
AIR: {id: 6, fov: 360, label: "airy"},
|
||||
//AZP: {fov: 180},
|
||||
//ARC: {id: 7, fov: 360, label: "zenital equidistant"},
|
||||
//NCP: {id: 8, fov: 180, label: "north celestial pole"},
|
||||
ARC: {id: 7, fov: 360, label: "zenital equidistant"},
|
||||
NCP: {id: 8, fov: 180, label: "north celestial pole"},*/
|
||||
// Cylindrical
|
||||
MER: {id: 9, label: "Mercator"},
|
||||
//CAR: {id: 10, fov: 360, label: "plate carrée"},
|
||||
//CEA: {id: 11, fov: 360, label: "cylindrical equal area"},
|
||||
//CYP: {id: 12, fov: 360, label: "cylindrical perspective"},
|
||||
/*CAR: {id: 10, fov: 360, label: "plate carrée"},
|
||||
CEA: {id: 11, fov: 360, label: "cylindrical equal area"},
|
||||
CYP: {id: 12, fov: 360, label: "cylindrical perspective"},*/
|
||||
// Pseudo-cylindrical
|
||||
AIT: {id: 13, label: "Hammer-Aïtoff"},
|
||||
//PAR: {id: 14, fov: 360, label: "parabolic"},
|
||||
//SFL: {id: 15, fov: 360, label: "sanson-flamsteed"},
|
||||
/*PAR: {id: 14, fov: 360, label: "parabolic"},
|
||||
SFL: {id: 15, fov: 360, label: "sanson-flamsteed"},*/
|
||||
MOL: {id: 16, label: "Mollweide"},
|
||||
// Conic
|
||||
//COD: {id: 17, fov: 360, label: "conic equidistant"},
|
||||
|
||||
@@ -836,7 +836,7 @@ export let View = (function () {
|
||||
.then(() => {
|
||||
if (view.aladin.statusBar) {
|
||||
view.aladin.statusBar.appendMessage({
|
||||
message: `${view.colorPickerTool.probedValue} copied into your clipboard`,
|
||||
message: `<span class="aladin-indicator" style="background-color: ${view.colorPickerTool.probedValue}"></span> [${view.colorPickerTool.probedValue}] copied into your clipboard`,
|
||||
duration: 1500,
|
||||
type: 'info'
|
||||
})
|
||||
|
||||
@@ -124,8 +124,8 @@ import { ActionButton } from "../Widgets/ActionButton.js";
|
||||
},
|
||||
error: () => {
|
||||
searchDropdown.addClass('aladin-not-valid')
|
||||
self.csForm.submit.update({disable: true})
|
||||
self.hipsCatLoad.update({disable: true});
|
||||
self.csForm.submit.update({disabled: true})
|
||||
self.hipsCatLoad.update({disabled: true});
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
@@ -144,8 +144,8 @@ import { ActionButton } from "../Widgets/ActionButton.js";
|
||||
searchDropdown.addClass('aladin-valid')
|
||||
} else {
|
||||
searchDropdown.addClass('aladin-not-valid')
|
||||
self.csForm.submit.update({disable: true})
|
||||
self.hipsCatLoad.update({disable: true});
|
||||
self.csForm.submit.update({disabled: true})
|
||||
self.hipsCatLoad.update({disabled: true});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ import { ActionButton } from "../Widgets/ActionButton.js";
|
||||
position: {direction: "bottom"}
|
||||
},
|
||||
content: 'HiPS',
|
||||
disable: true,
|
||||
disabled: true,
|
||||
action() {
|
||||
self.fnIdSelected('hips', {
|
||||
hipsURL: self.selectedItem.hips_service_url,
|
||||
@@ -227,7 +227,7 @@ import { ActionButton } from "../Widgets/ActionButton.js";
|
||||
|
||||
let form = new Form({
|
||||
submit: {
|
||||
disable: true,
|
||||
disabled: true,
|
||||
icon: {
|
||||
monochrome: true,
|
||||
url: targetIconUrl,
|
||||
@@ -366,15 +366,15 @@ import { ActionButton } from "../Widgets/ActionButton.js";
|
||||
this.selectedItem = item;
|
||||
|
||||
if (!item) {
|
||||
this.csForm.submit.update({disable: true})
|
||||
this.hipsCatLoad.update({disable: true});
|
||||
this.csForm.submit.update({disabled: true})
|
||||
this.hipsCatLoad.update({disabled: true});
|
||||
} else {
|
||||
if (item && item.cs_service_url) {
|
||||
this.csForm.submit.update({disable: false});
|
||||
this.csForm.submit.update({disabled: false});
|
||||
}
|
||||
|
||||
if (item && item.hips_service_url) {
|
||||
this.hipsCatLoad.update({disable: false});
|
||||
this.hipsCatLoad.update({disabled: false});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ export class HiPSBrowserBox extends Box {
|
||||
self.searchTree.triggerFilter({title: value});
|
||||
|
||||
self.infoCurrentHiPSBtn.update({
|
||||
disable: true,
|
||||
disabled: true,
|
||||
})
|
||||
},
|
||||
});
|
||||
@@ -260,7 +260,7 @@ export class HiPSBrowserBox extends Box {
|
||||
});
|
||||
|
||||
let infoCurrentHiPSBtn = ActionButton.BUTTONS(aladin)
|
||||
.infoHiPS({disable: true})
|
||||
.infoHiPS({disabled: true})
|
||||
|
||||
let filterBox = new HiPSFilterBox(aladin, {
|
||||
callback: (params) => {
|
||||
@@ -387,7 +387,7 @@ export class HiPSBrowserBox extends Box {
|
||||
self.searchDropdown.addClass('aladin-valid');
|
||||
|
||||
self.infoCurrentHiPSBtn.update({
|
||||
disable: false,
|
||||
disabled: false,
|
||||
action(e) {
|
||||
window.open(hips.url);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,8 @@ import { WidgetTogglerButton } from "../Button/Toggler.js";
|
||||
change: (e) => {
|
||||
let minCut = +e.target.value
|
||||
self.options.layer.setCuts(minCut, self.options.layer.getColorCfg().getCuts()[1])
|
||||
}
|
||||
},
|
||||
cssStyle: { width: '7rem' }
|
||||
},
|
||||
{
|
||||
type: 'number',
|
||||
@@ -226,7 +227,8 @@ import { WidgetTogglerButton } from "../Button/Toggler.js";
|
||||
change: (e) => {
|
||||
let maxCut = +e.target.value
|
||||
self.options.layer.setCuts(self.options.layer.getColorCfg().getCuts()[0], maxCut)
|
||||
}
|
||||
},
|
||||
cssStyle: { width: '7rem' }
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
@@ -739,13 +739,13 @@ export class OverlayStackBox extends Box {
|
||||
createLayout() {
|
||||
this.ui = {};
|
||||
|
||||
let layout = [[this.addOverlayBtn, "Overlays"]];
|
||||
let layout = [[this.addOverlayBtn, " Overlays"]];
|
||||
|
||||
layout = layout.concat(this._createOverlaysList());
|
||||
layout.push(
|
||||
[
|
||||
this.addHiPSBtn,
|
||||
"Surveys",
|
||||
" Surveys",
|
||||
this.filterEnabler,
|
||||
this.filterBtn,
|
||||
],
|
||||
|
||||
@@ -49,7 +49,7 @@ export class ConeSearchActionButton extends ActionButton {
|
||||
url: targetIconUrl
|
||||
},
|
||||
tooltip: options.tooltip,
|
||||
disable: options.disable,
|
||||
disabled: options.disabled,
|
||||
cssStyle: {
|
||||
backgroundPosition: 'center center',
|
||||
cursor: 'pointer',
|
||||
|
||||
@@ -44,7 +44,7 @@ import waveOffIconUrl from '../../../../assets/icons/wave-off.svg';
|
||||
url: waveOffIconUrl
|
||||
},
|
||||
tooltip: {content: 'SAMP disabled in Aladin Lite options', position: {direction: 'top'}},
|
||||
disable: true,
|
||||
disabled: true,
|
||||
}
|
||||
} else {
|
||||
//let isHubRunning = aladin.samp.isHubCurrentlyRunning();
|
||||
@@ -92,23 +92,6 @@ import waveOffIconUrl from '../../../../assets/icons/wave-off.svg';
|
||||
}
|
||||
self.update({icon})
|
||||
});
|
||||
|
||||
/*ALEvent.SAMP_HUB_RUNNING.listenedBy(aladin.aladinDiv, function (e) {
|
||||
const isHubRunning = e.detail.isHubRunning;
|
||||
|
||||
if (hubRunning !== isHubRunning) {
|
||||
let newOptions = {
|
||||
disable: !isHubRunning,
|
||||
tooltip: isHubRunning ? {content: 'Connect to SAMP hub'} : {content: 'No hub running found'}
|
||||
};
|
||||
|
||||
self.update(newOptions)
|
||||
if (isHubRunning === false) {
|
||||
self.update({iconURL: waveOffIconUrl})
|
||||
}
|
||||
hubRunning = isHubRunning;
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
static sendSources(aladin) {
|
||||
|
||||
@@ -54,7 +54,7 @@ import A from "../../A";
|
||||
* @property {function} [opt.action] - The callback function to execute when the button is clicked.
|
||||
* @property {string} [opt.title] - The title attribute for the button.
|
||||
* @property {Object} [opt.icon] - An icon object for the button.
|
||||
* @property {boolean} [opt.disable=false] - Whether the button is initially disabled.
|
||||
* @property {boolean} [opt.disabled=false] - Whether the button is initially disabled.
|
||||
* @property {HTMLElement|string|Widget} [opt.content] - The content to be added to the button.
|
||||
* @property {CSSStyleSheet} [opt.cssStyle] - The CSS styles to apply to the button.
|
||||
* @property {Object} [opt.tooltip] - A tooltip.
|
||||
@@ -225,7 +225,7 @@ export class ActionButton extends DOMElement {
|
||||
monochrome: true,
|
||||
url: targetIconUrl,
|
||||
},
|
||||
disable: ra === undefined || dec === undefined || fov === undefined,
|
||||
disabled: ra === undefined || dec === undefined || fov === undefined,
|
||||
tooltip: {
|
||||
content: "Target interesting sky location",
|
||||
},
|
||||
|
||||
@@ -46,7 +46,7 @@ import { Tooltip } from "./Tooltip";
|
||||
* @property {function} [opt.action] - The callback function to execute when the button is clicked.
|
||||
* @property {string} [opt.title] - The title attribute for the button.
|
||||
* @property {string} [opt.iconURL] - The URL of the icon image for the button.
|
||||
* @property {boolean} [opt.disable=false] - Whether the button is initially disabled.
|
||||
* @property {boolean} [opt.disabled=false] - Whether the button is initially disabled.
|
||||
* @property {HTMLElement|string|Widget} [opt.content] - The content to be added to the button.
|
||||
* @property {CSSStyleSheet} [opt.cssStyle] - The CSS styles to apply to the button.
|
||||
* @property {string} [opt.tooltip] - The tooltip text for the button.
|
||||
|
||||
@@ -199,7 +199,7 @@ export class Tree extends DOMElement {
|
||||
if(this.params && this.filter && !this.filter(child, this.params)) {
|
||||
elt.style.display = "none";
|
||||
} else {
|
||||
elt.style.display = "block";
|
||||
elt.style.display = "";
|
||||
noEltsListed = false;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ export class Tree extends DOMElement {
|
||||
if (this.onlyInView) {
|
||||
childElt.style.display = "none";
|
||||
} else {
|
||||
childElt.style.display = "block";
|
||||
childElt.style.display = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -301,7 +301,7 @@ export class Tree extends DOMElement {
|
||||
if (numFilteringMatching == 0) {
|
||||
elt.style.display = "none";
|
||||
} else {
|
||||
elt.style.display = "block";
|
||||
elt.style.display = "";
|
||||
noEltsListed = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user