mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2026-03-12 13:13:10 -07:00
add test on rotation angle before giving it to aladin lite: https://github.com/cds-astro/aladin-lite/issues/330
This commit is contained in:
@@ -23,6 +23,9 @@ Image Opacity: <br/> <input id="slider" type="range" value=1 min=0 max=1 step=0.
|
||||
aladin = A.aladin('#aladin-lite-div', {target: "0 0", cooFrame: "gal"});
|
||||
|
||||
var callback = function(ra, dec, fov) {
|
||||
aladin.gotoRaDec(ra, dec)
|
||||
aladin.setFov(fov)
|
||||
|
||||
A.catalogFromSimbad( {ra: ra, dec: dec} , 1 , {shape: 'circle', color: '#5d5', onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat)
|
||||
});
|
||||
@@ -37,16 +40,14 @@ Image Opacity: <br/> <input id="slider" type="range" value=1 min=0 max=1 step=0.
|
||||
aladin.setBaseImageLayer('P/Mellinger/color');
|
||||
|
||||
//let fits = aladin.displayFITS('http://goldmine.mib.infn.it/data//B/fits/A04_VC1316_ooooog.fits', 'overlay');
|
||||
let jpg = aladin.displayJPG(
|
||||
aladin.setOverlayImageLayer(A.image(
|
||||
// the JPG to transform to HiPS
|
||||
'http://goldmine.mib.infn.it/data//B/fits/A04_VC1316_ooooog.fits',
|
||||
'https://www.astropix.org/archive/esahubble/potm2602b/esahubble_potm2602b_1024.jpg',
|
||||
// no options
|
||||
{
|
||||
transparency: 1.0,
|
||||
successCallback: callback
|
||||
},
|
||||
// A callback fn once the overlay is set
|
||||
callback
|
||||
);
|
||||
));
|
||||
|
||||
$('input[name=survey]').change(function() {
|
||||
let surveyName = $(this).val();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2183,6 +2183,10 @@ export let Aladin = (function () {
|
||||
* view in the counter clockwise order (or towards the east)
|
||||
*/
|
||||
Aladin.prototype.setRotation = function (rotation) {
|
||||
if (!rotation) {
|
||||
console.warn("Rotation angle is not valid:", rotation)
|
||||
return;
|
||||
}
|
||||
this.view.setRotation(rotation);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user