+
({
- ra: s.ra,
- dec: s.dec,
- name: s.name,
- sourceId: s.source_id,
- }))}
+ sources={skySources}
width={DEFAULT_HOMEPAGE_PLOT_LAYOUT.width}
/>
diff --git a/src/components/styles/source-page.css b/src/components/styles/source-page.css
index ef7b25b..cf1dc0a 100644
--- a/src/components/styles/source-page.css
+++ b/src/components/styles/source-page.css
@@ -78,12 +78,12 @@
.aladin-container {
border: 1px solid #c4c8cb;
border-radius: 5px;
+ z-index: 5;
}
.aladin-viewer-container {
width: 400px;
height: 400px;
- z-index: 1;
}
.aladin-popupTitle {
diff --git a/src/index.css b/src/index.css
index 650e362..9eb2b43 100644
--- a/src/index.css
+++ b/src/index.css
@@ -149,4 +149,33 @@ footer {
.all-sky-wrapper {
position: relative;
+ color: white;
+}
+
+.sources-plot-container.all-sky {
+ background-color: black;
+}
+
+/* Aladin Lite renders its own coordinate/projection toolbar across the top of the
+ canvas, so make title container relative in order to push the Aladin Lite viewer
+ beneath the title container */
+.all-sky-wrapper .title-container {
+ position: relative;
+}
+
+.all-sky-tooltip {
+ position: absolute;
+ z-index: 6;
+ pointer-events: none;
+ background-color: rgba(0, 0, 0, 0.85);
+ color: white;
+ padding: 6px 10px;
+ border-radius: 4px;
+ font-size: 12px;
+ white-space: nowrap;
+}
+
+.all-sky-tooltip-name {
+ font-weight: bold;
+ margin-bottom: 2px;
}
diff --git a/src/types/aladin.d.ts b/src/types/aladin.d.ts
index 72d7b4a..15cbb59 100644
--- a/src/types/aladin.d.ts
+++ b/src/types/aladin.d.ts
@@ -8,9 +8,34 @@
*
* Refer to the Aladin docs: https://cds-astro.github.io/aladin-lite/Aladin.html
*/
+interface AladinClickedObject {
+ data?: Record
;
+ ra?: number;
+ dec?: number;
+}
+
interface Aladin {
gotoRaDec: (ra: number, dec: number) => void;
addCatalog: (catalog: unknown) => void;
+ setProjection: (projection: string) => void;
+ setFov: (fovDegrees: number) => void;
+ getFov: () => [number, number];
+ /** Only the events we actually listen for are typed here; add more as needed. */
+ on: {
+ (
+ event: 'objectClicked',
+ callback: (object: AladinClickedObject) => void
+ ): void;
+ (
+ event: 'objectHovered' | 'objectHoveredStop',
+ callback: (
+ object: AladinClickedObject,
+ xyMouseCoords: { x: number; y: number }
+ ) => void
+ ): void;
+ };
+ /** Detaches every catalog/overlay layer added via addCatalog/addOverlay. */
+ removeLayers: () => void;
}
interface Catalog {
@@ -19,11 +44,13 @@ interface Catalog {
interface CatalogOptions {
name: string;
- shape: (
+ shape?: (
source: { x: number; y: number },
canvasCtx: CanvasRenderingContext2D
) => void;
- onClick: string;
+ onClick?: string;
+ color?: string;
+ sourceSize?: number;
}
/**