diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 57160ccb1..867f43c5e 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -21,6 +21,7 @@ jobs: run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source "$HOME/.cargo/env" + rustup default nightly - name: "Install wasm-pack" run: | curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e9c092e9..cc5afb278 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,7 @@ jobs: run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source "$HOME/.cargo/env" + rustup default nightly - name: "Install wasm-pack" run: | curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y diff --git a/.gitignore b/.gitignore deleted file mode 100644 index bd402ac05..000000000 --- a/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -node_modules - -dist -examples/.DS_Store -examples/fits -.DS_Store -package-lock.json -src/core/target/ -src/core/Cargo.lock - -aladin-lite*.tgz - -.vscode - -deploy.sh -deploy-beta.sh diff --git a/assets/icons/brightness.svg b/assets/icons/brightness.svg new file mode 100644 index 000000000..e76c0ea9d --- /dev/null +++ b/assets/icons/brightness.svg @@ -0,0 +1,55 @@ + + + \ No newline at end of file diff --git a/assets/icons/camera.svg b/assets/icons/camera.svg new file mode 100644 index 000000000..a5036b9f7 --- /dev/null +++ b/assets/icons/camera.svg @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/assets/icons/color.svg b/assets/icons/color.svg new file mode 100644 index 000000000..5502e1e89 --- /dev/null +++ b/assets/icons/color.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/assets/icons/copy.svg b/assets/icons/copy.svg new file mode 100644 index 000000000..29c228971 --- /dev/null +++ b/assets/icons/copy.svg @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/assets/icons/edit.svg b/assets/icons/edit.svg new file mode 100644 index 000000000..f0e21be55 --- /dev/null +++ b/assets/icons/edit.svg @@ -0,0 +1,24 @@ + + + + \ No newline at end of file diff --git a/assets/icons/finish.svg b/assets/icons/finish.svg new file mode 100644 index 000000000..711ed70da --- /dev/null +++ b/assets/icons/finish.svg @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/assets/icons/font-size.svg b/assets/icons/font-size.svg new file mode 100644 index 000000000..31764824e --- /dev/null +++ b/assets/icons/font-size.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/assets/icons/function.svg b/assets/icons/function.svg new file mode 100644 index 000000000..0585b6464 --- /dev/null +++ b/assets/icons/function.svg @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/assets/icons/grid.svg b/assets/icons/grid.svg new file mode 100644 index 000000000..79b38637e --- /dev/null +++ b/assets/icons/grid.svg @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/assets/icons/help.svg b/assets/icons/help.svg new file mode 100644 index 000000000..83d83794f --- /dev/null +++ b/assets/icons/help.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/assets/icons/hide.svg b/assets/icons/hide.svg new file mode 100644 index 000000000..e283a029e --- /dev/null +++ b/assets/icons/hide.svg @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/assets/icons/info.svg b/assets/icons/info.svg new file mode 100644 index 000000000..bfc9e20d9 --- /dev/null +++ b/assets/icons/info.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/assets/icons/loading.svg b/assets/icons/loading.svg new file mode 100644 index 000000000..ae475d1a2 --- /dev/null +++ b/assets/icons/loading.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/assets/icons/map.svg b/assets/icons/map.svg new file mode 100644 index 000000000..f7d54bb04 --- /dev/null +++ b/assets/icons/map.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/assets/icons/maximize.svg b/assets/icons/maximize.svg new file mode 100644 index 000000000..b334f2dfc --- /dev/null +++ b/assets/icons/maximize.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/assets/icons/minus.svg b/assets/icons/minus.svg new file mode 100644 index 000000000..bc96d6103 --- /dev/null +++ b/assets/icons/minus.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/assets/icons/move.svg b/assets/icons/move.svg new file mode 100644 index 000000000..be7aa16ba --- /dev/null +++ b/assets/icons/move.svg @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/assets/icons/opacity.svg b/assets/icons/opacity.svg new file mode 100644 index 000000000..4a64379ca --- /dev/null +++ b/assets/icons/opacity.svg @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/assets/icons/pixel_histogram.svg b/assets/icons/pixel_histogram.svg new file mode 100644 index 000000000..2363bb7b2 --- /dev/null +++ b/assets/icons/pixel_histogram.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/assets/icons/plus.svg b/assets/icons/plus.svg new file mode 100644 index 000000000..637f5d9f0 --- /dev/null +++ b/assets/icons/plus.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/assets/icons/projection.svg b/assets/icons/projection.svg new file mode 100644 index 000000000..4255c3bcc --- /dev/null +++ b/assets/icons/projection.svg @@ -0,0 +1,21 @@ + + + + \ No newline at end of file diff --git a/assets/icons/remove.svg b/assets/icons/remove.svg new file mode 100644 index 000000000..8b63983ea --- /dev/null +++ b/assets/icons/remove.svg @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/assets/icons/restore.svg b/assets/icons/restore.svg new file mode 100644 index 000000000..8e2aad9d7 --- /dev/null +++ b/assets/icons/restore.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/assets/icons/reticle.svg b/assets/icons/reticle.svg new file mode 100644 index 000000000..82427adf9 --- /dev/null +++ b/assets/icons/reticle.svg @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/assets/icons/search-white.svg b/assets/icons/search-white.svg new file mode 100644 index 000000000..4a06d0bed --- /dev/null +++ b/assets/icons/search-white.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/assets/icons/search.svg b/assets/icons/search.svg new file mode 100644 index 000000000..648171eb1 --- /dev/null +++ b/assets/icons/search.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/assets/icons/select.svg b/assets/icons/select.svg new file mode 100644 index 000000000..bbd5f4a6d --- /dev/null +++ b/assets/icons/select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/settings.svg b/assets/icons/settings.svg new file mode 100644 index 000000000..ba0aa4398 --- /dev/null +++ b/assets/icons/settings.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/assets/icons/share.svg b/assets/icons/share.svg new file mode 100644 index 000000000..e25e1d111 --- /dev/null +++ b/assets/icons/share.svg @@ -0,0 +1,21 @@ + + + + \ No newline at end of file diff --git a/assets/icons/show.svg b/assets/icons/show.svg new file mode 100644 index 000000000..2a00ea56c --- /dev/null +++ b/assets/icons/show.svg @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/assets/icons/stack.svg b/assets/icons/stack.svg new file mode 100644 index 000000000..ffaa37154 --- /dev/null +++ b/assets/icons/stack.svg @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/assets/icons/target.svg b/assets/icons/target.svg new file mode 100644 index 000000000..090311884 --- /dev/null +++ b/assets/icons/target.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/telescope.svg b/assets/icons/telescope.svg new file mode 100644 index 000000000..9d3ce1319 --- /dev/null +++ b/assets/icons/telescope.svg @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/assets/icons/thickness.svg b/assets/icons/thickness.svg new file mode 100644 index 000000000..6c5e85125 --- /dev/null +++ b/assets/icons/thickness.svg @@ -0,0 +1,16 @@ + + + \ No newline at end of file diff --git a/assets/icons/tooltip.svg b/assets/icons/tooltip.svg new file mode 100644 index 000000000..1ec834709 --- /dev/null +++ b/assets/icons/tooltip.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/assets/icons/upload.svg b/assets/icons/upload.svg new file mode 100644 index 000000000..f387c575f --- /dev/null +++ b/assets/icons/upload.svg @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/assets/icons/wave-off.svg b/assets/icons/wave-off.svg new file mode 100644 index 000000000..76d8038df --- /dev/null +++ b/assets/icons/wave-off.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/assets/icons/wave-on.svg b/assets/icons/wave-on.svg new file mode 100644 index 000000000..17b3b8b2e --- /dev/null +++ b/assets/icons/wave-on.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/assets/target.svg b/assets/target.svg deleted file mode 100644 index ed04eec3d..000000000 --- a/assets/target.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - - diff --git a/examples/al-adass2022.html b/examples/al-adass2022.html index 6c6063780..ad96b8084 100644 --- a/examples/al-adass2022.html +++ b/examples/al-adass2022.html @@ -10,7 +10,7 @@ import A from '../src/js/A.js'; let aladin; A.init.then(() => { - aladin = A.aladin('#aladin-lite-div', {survey: ["P/PanSTARRS/DR1/color-i-r-g"], showReticle: false, gridOptions: {opacity: 0.5}, projection: "AIT", cooFrame: 'galactic', target: "93.2721132 -20.9942421", fov: 1000, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGrid: false, showCooGridControl: false}); + aladin = A.aladin('#aladin-lite-div', {survey: ["P/PanSTARRS/DR1/color-i-r-g"], showReticle: false, gridOptions: {opacity: 0.5, color: 'rgba(255, 0, 0)'}, projection: "AIT", cooFrame: 'icrs', target: "stephan's quintet", fov: 1000, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGrid: true, showCooGridControl: false}); const chft = aladin.createImageSurvey('CFHT', "CFHT deep view of NGC7331 and Stephan's quintet u+g+r", "https://cds.unistra.fr/~derriere/PR_HiPS/2022_Duc/", null, null, {imgFormat: 'png'}); const nircamJWST = aladin.createImageSurvey('Nircam', "Stephans Quintet NIRCam+MIRI", "http://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_NIRCam+MIRI/", null, null, {imgFormat: 'png', colormap: "viridis"}); @@ -21,7 +21,7 @@ aladin.getOverlayImageLayer("CFHT").toggle(); aladin.getOverlayImageLayer("Nircam").toggle(); - let fov = 1000; + let fov = 360; let rotation = 0; setInterval(function zoom() { @@ -30,7 +30,7 @@ rotation += 0.07; aladin.setRotation(rotation) - aladin.setFov(fov); + aladin.setFoV(fov); if (fov < 3 && fov > 0.5) { let opacity = 1.0 - (fov - 0.5)/(3 - 0.5); diff --git a/examples/al-animation-CS-CDS-2022.html b/examples/al-animation-CS-CDS-2022.html index a5d2ca832..1840629b8 100644 --- a/examples/al-animation-CS-CDS-2022.html +++ b/examples/al-animation-CS-CDS-2022.html @@ -71,9 +71,9 @@ aladin.setFoV(400) await delay(2000) - aladin.setProjection('HPX') - aladin.setFoV(400) - await delay(2000) + //aladin.setProjection('HPX') + //aladin.setFoV(400) + //await delay(2000) aladin.setProjection('AIT') aladin.setFoV(400) @@ -326,7 +326,7 @@ await delay(1000) - notify('Projection support:', 'Orthographic, Mercator, HEALPix, Aitoff', 6500) + notify('Projection support:', 'Orthographic, Mercator, Aitoff', 6500) await delay(1000) diff --git a/examples/al-catalog-hips.html b/examples/al-catalog-hips.html index fce33d494..379623bd6 100644 --- a/examples/al-catalog-hips.html +++ b/examples/al-catalog-hips.html @@ -11,7 +11,7 @@ let aladin; A.init.then(() => { aladin = A.aladin('#aladin-lite-div', {target: 'LMC', fov: 55, showContextMenu: true}); - var hips = A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', {onClick: 'showTable', name: 'Simbad'}); + var hips = A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', {onClick: 'showPopup', name: 'Simbad'}); aladin.addCatalog(hips); }); diff --git a/examples/al-coronelli.html b/examples/al-coronelli.html index e5d9a70db..97decd871 100644 --- a/examples/al-coronelli.html +++ b/examples/al-coronelli.html @@ -497,7 +497,7 @@ deleteOverlayTimeout = undefined; } isDrawing = true; - points.push([Utils.relMouseCoords(drawOverlayCanvas.imageCanvas, e)]); + points.push([Utils.relMouseCoords(e)]); }); @@ -506,7 +506,7 @@ e.preventDefault(); drawOverlayCtx.clearRect(0, 0, drawOverlayCtx.canvas.width, drawOverlayCtx.canvas.height); - points[points.length-1].push(Utils.relMouseCoords(drawOverlayCanvas.imageCanvas, e)); + points[points.length-1].push(Utils.relMouseCoords(e)); drawOverlayCtx.beginPath(); diff --git a/examples/al-customize-button.html b/examples/al-customize-button.html new file mode 100644 index 000000000..6c6fc5b15 --- /dev/null +++ b/examples/al-customize-button.html @@ -0,0 +1,80 @@ + + +
+ + + + + + + + + diff --git a/examples/al-cuts-fits-hips.html b/examples/al-cuts-fits-hips.html new file mode 100644 index 000000000..3faf8f24e --- /dev/null +++ b/examples/al-cuts-fits-hips.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + diff --git a/examples/al-displayFITS.html b/examples/al-displayFITS.html index 59859a809..107080c75 100644 --- a/examples/al-displayFITS.html +++ b/examples/al-displayFITS.html @@ -22,6 +22,7 @@ { minCut: 5000, maxCut: 17000, + colormap: 'viridis' }, // no optional params (ra, dec, fov, image) => { // ra, dec and fov are centered around the fits image diff --git a/examples/al-displayJPG.html b/examples/al-displayJPG.html index db635cec6..265c5dc7d 100644 --- a/examples/al-displayJPG.html +++ b/examples/al-displayJPG.html @@ -23,7 +23,9 @@ aladin = A.aladin('#aladin-lite-div', {target: "0 0", cooFrame: "gal"}); var callback = function(ra, dec, fov) { - aladin.addCatalog(A.catalogFromSimbad( {ra: ra, dec: dec} , 1 , {shape: 'circle', color: '#5d5', onClick: 'showTable'})); + A.catalogFromSimbad( {ra: ra, dec: dec} , 1 , {shape: 'circle', color: '#5d5', onClick: 'showTable'}, (cat) => { + aladin.addCatalog(cat) + }); // we must return true, so that the default action (set view to center of image) is performed return true; } @@ -39,7 +41,9 @@ // the JPG to transform to HiPS 'https://noirlab.edu/public/media/archives/images/large/noirlab1912a.jpg', // no options - {}, + { + transparency: 0.6, + }, // A callback fn once the overlay is set callback ); diff --git a/examples/al-easy-access-simbad-ned.html b/examples/al-easy-access-simbad-ned.html index fb8adff2e..64340aa28 100644 --- a/examples/al-easy-access-simbad-ned.html +++ b/examples/al-easy-access-simbad-ned.html @@ -5,15 +5,33 @@ - + diff --git a/examples/al-easy-access-vizier.html b/examples/al-easy-access-vizier.html index c568cfc38..3c1d5e2b3 100644 --- a/examples/al-easy-access-vizier.html +++ b/examples/al-easy-access-vizier.html @@ -9,12 +9,34 @@