Skip to content

Commit 5a09204

Browse files
committed
fix #379, Arc class for grid line labels
1 parent 72f3078 commit 5a09204

48 files changed

Lines changed: 4672 additions & 3830 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ deploy/
99
# node dependencies
1010
node_modules/
1111

12-
package-lock.json
13-
1412
# rust tmp files for useful for the compilation phase
1513
src/core/Cargo.lock
1614
src/core/target/

assets/icons/cube.svg

Lines changed: 14 additions & 0 deletions
Loading

assets/icons/header.svg

Lines changed: 5 additions & 0 deletions
Loading

examples/al-cat-galaxy-shape.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
aladin = A.aladin('#aladin-lite-div', {
1414
target: "M31",
1515
fov: 89.78,
16+
realFullscreen: true,
1617
showContextMenu: true,
1718
showSimbadPointerControl: true,
1819
showShareControl: true,

examples/al-displayFITS.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@
2121
name: 'm61',
2222
colormap: 'viridis'
2323
}, // no optional params
24-
(ra, dec, fov, _) => {
24+
(ra, dec, fov, image) => {
2525
// ra, dec and fov are centered around the fits image
2626
aladin.gotoRaDec(ra, dec);
2727
aladin.setFoV(fov);
2828
},
2929
);
30+
31+
(async () => {
32+
let header = await aladin.getOverlayImageLayer().getHeader(0);
33+
})();
3034
});
3135
</script>
3236
</body>

examples/al-multiple-instances.html

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,38 @@
33
<head>
44
</head>
55
<body>
6-
<div id="al1" style="width: 512px; height: 512px">
7-
</div>
8-
<div id="al2" style="width: 512px; height: 512px">
6+
<div id="aladin-lite-div" style="width: 512px; height: 512px">
97
</div>
8+
109

1110
<script type="module">
1211
import A from '../src/js/A.js';
13-
let al1;
14-
let al2;
15-
A.init.then(() => {
16-
// Start up Aladin Lite
17-
al1 = A.aladin('#al1', {target: 'M51', fov: 0.3, survey: 'https://alasky.cds.unistra.fr/HIPS3D/LGLBSHI-test-compression/', fullScreen: false, showContextMenu: true, showShareControl: true});
18-
al2 = A.aladin('#al2', {target: 'M51', fov: 180, survey: 'P/PanSTARRS/DR1/z', showColorPickerControl: true, fullScreen: false, showContextMenu: true, showShareControl: true});
19-
});
12+
let aladin;
13+
14+
A.init.then(() => {
15+
aladin = A.aladin("#aladin-lite-div", {
16+
fov: 2,
17+
survey:
18+
"https://images.rubinobservatory.org/hips/SVImages_v2/color_ugri",
19+
backgroundColor: "rgb(0,0,0)",
20+
cooFrame: "ICRSd",
21+
});
22+
23+
aladin.setFoVRange(0.002, 10);
24+
aladin.gotoRaDec(186.5, 6.95);
25+
26+
// Only imgFormat, cooFrame, maxOrder and an url are required. If one is missing the properties file will be fetched
27+
const secondSurvey = {
28+
imgFormat: "webp",
29+
cooFrame: "ICRSd",
30+
maxOrder: 11,
31+
url: "https://images.rubinobservatory.org/hips/asteroids/color_ugri",
32+
};
33+
34+
const hips = A.HiPS(secondSurvey.url, { ...secondSurvey, opacity: 1 });
35+
// by default this overlays the first hips with a second.
36+
aladin.setOverlayImageLayer(hips);
37+
});
2038
</script>
2139

2240
</body>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"homepage": "https://aladin.cds.unistra.fr/",
33
"name": "aladin-lite",
44
"type": "module",
5-
"version": "3.9.0-beta",
5+
"version": "3.9.1-beta",
66
"description": "An astronomical HiPS visualizer in the browser",
77
"author": "Thomas Boch and Matthieu Baumann",
88
"license": "LGPL-3.0-or-later",

src/core/al-core/src/image/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ pub enum ImageType {
252252
raw_bytes: js_sys::Uint8Array,
253253
size: (u32, u32, u32),
254254
},
255+
Blob {
256+
blob: web_sys::Blob,
257+
size: (u32, u32, u32),
258+
},
255259
Canvas {
256260
canvas: Canvas<RGBA8U>,
257261
},
@@ -307,7 +311,8 @@ impl Image for ImageType {
307311
for image in images {
308312
image.insert_into_3d_texture(textures, offset)?
309313
}
310-
}
314+
},
315+
ImageType::Blob { .. } => unreachable!(),
311316
ImageType::Canvas { canvas } => canvas.insert_into_3d_texture(textures, offset)?,
312317
ImageType::ImageRgba8u { image } => image.insert_into_3d_texture(textures, offset)?,
313318
ImageType::ImageRgb8u { image } => image.insert_into_3d_texture(textures, offset)?,
@@ -332,6 +337,7 @@ impl Image for ImageType {
332337
match self {
333338
ImageType::FitsRawBytes { size, .. } => *size,
334339
ImageType::Canvas { canvas } => canvas.get_size(),
340+
ImageType::Blob { size, .. } => *size,
335341
ImageType::ImageRgba8u { image } => image.get_size(),
336342
ImageType::ImageRgb8u { image } => image.get_size(),
337343
ImageType::HTMLImageRgba8u { image } => image.get_size(),

0 commit comments

Comments
 (0)