Compare commits

...

7 Commits

Author SHA1 Message Date
Thomas Boch
0d613a9b42 Merge pull request #221 from cds-astro/revert-220-fix-circle-opacity-not-working
Revert "Bug fix: opacity is now available for Circle overlays (issue #215)"
2025-01-16 10:03:44 +01:00
Thomas Boch
09f1302646 Revert "Bug fix: opacity is now available for Circle overlays (issue #215)" 2025-01-16 10:03:08 +01:00
Thomas Boch
c39045171e Merge pull request #220 from cds-astro/fix-circle-opacity-not-working
Bug fix: opacity is now available for Circle overlays (issue #215)
2025-01-16 10:00:15 +01:00
Thomas Boch
bbd5848bdb Bug fix: opacity is now available for Circle overlays (issue #215) 2025-01-16 09:58:17 +01:00
Thomas Boch
7062a3cd76 Update README.md with terms of use
Add Terms of use for Aladin Lite embedding.
2024-12-05 10:26:32 +01:00
Matthieu Baumann
f79d47d61e update jsdoc template to docdash 2024-09-24 23:36:19 +02:00
Matthieu Baumann
e6321f3950 resize vignettes 2024-09-24 18:27:42 +02:00
13 changed files with 78 additions and 18 deletions

View File

@@ -47,6 +47,8 @@ Editable examples showing the API can also be found [here](https://aladin.cds.un
## Embed it into your projects
**Terms of use**: you are welcome to integrate Aladin Lite in your web pages and to customize its GUI to your needs, but **please leave the Aladin logo and link intact** at the bottom right of the view.
You can embed Aladin Lite it into your webpages in two ways
### The vanilla way

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 962 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 69 KiB

8
jsdoc-custom-style.css Normal file
View File

@@ -0,0 +1,8 @@
nav > h2 {
color: blue;
font-size: medium;
}
nav > ul > li > a {
font-size: medium;
}

View File

@@ -10,13 +10,64 @@
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"docdash": {
"scripts": [
"jsdoc-custom-style.css"
],
"sectionOrder": [
"Namespaces",
"Classes",
"Modules",
"Externals",
"Events",
"Mixins",
"Tutorials",
"Interfaces"
],
"openGraph": {
"title": "Aladin Lite API documentation",
"type": "website",
"image": "https://cds-astro.github.io/aladin-lite/aladin-logo.png",
"site_name": "Aladin Lite API documentation",
"url": "https://cds-astro.github.io/aladin-lite/"
},
"meta": {
"title": "Aladin Lite API documentation",
"description": "Aladin Lite API documentation",
"keyword": "astronomy"
},
"search": true,
"menu": {
"Project Website": {
"href":"https://aladin.cds.unistra.fr/AladinLite/doc/",
"target":"_blank",
"class":"menu-item",
"id":"website_link"
},
"Forum": {
"href":"https://github.com/cds-astro/aladin-lite/issues",
"target":"_blank",
"class":"menu-item",
"id":"forum_link"
}
}
},
"templates": {
"cleverLinks": true,
"monospaceLinks": true
"monospaceLinks": true,
"default": {
"staticFiles": {
"include": [
"./jsdoc-custom-style.css"
]
}
}
},
"opts": {
"readme": "./README.md",
"destination": "./docs/",
"tutorials": "./tutorials"
"template": "node_modules/docdash",
"encoding": "utf8",
"verbose": true
}
}
}

View File

@@ -44,11 +44,12 @@
"test:build": "cd src/core && cargo test --release --features webgl2",
"test:playwright": "npx playwright test",
"test:update-snapshots": "npx playwright test --update-snapshots",
"doc": "jsdoc -c jsdoc.json src/js src/js/shapes src/js/libs/astro && cp aladin-logo.png docs/",
"doc": "jsdoc -c jsdoc.json src/js src/js/shapes src/js/libs/astro && cp aladin-logo.png docs/ && cp jsdoc-custom-style.css docs/",
"doc:dev": "npm run doc && open docs/index.html"
},
"devDependencies": {
"@playwright/test": "^1.47.0",
"docdash": "^2.0.2",
"jsdoc": "^4.0.2",
"vite": "^4.3.8",
"vite-plugin-glsl": "^1.1.2",

View File

@@ -182,20 +182,21 @@ export let AladinUtils = {
* @param {number} ra - Right Ascension (RA) coordinate in degrees.
* @param {number} dec - Declination (Dec) coordinate in degrees.
* @param {Aladin} aladin - Aladin Lite object containing the WebAssembly API.
* @returns {number[]} xy - A 2 elements array representing the screen coordinates [X, Y] in pixels.
* @returns {number[]} A 2 elements array representing the screen coordinates [X, Y] in pixels.
*/
radecToViewXy: function(ra, dec, aladin) {
return aladin.world2pix(ra, dec);
},
/**
* Convert a number in degrees into a string<br>
*
* @function
* @memberof AladinUtils
* @name degreesToString
* Convert a number in degrees into a string<br>
*
*
* @param numberDegrees number in degrees (integer or decimal)
* @return a formattes string
* @return the formatted string
*
* @example <caption> Result in degrees </caption>
* // returns "1°"

View File

@@ -128,8 +128,8 @@ PropertyParser.isPlanetaryBody = function (properties) {
};
/**
* HiPS options
* @typedef {Object} HiPSOptions
*
* @property {string} [name] - The name of the survey to be displayed in the UI
* @property {Function} [successCallback] - A callback executed when the HiPS has been loaded
* @property {Function} [errorCallback] - A callback executed when the HiPS could not be loaded
@@ -155,19 +155,16 @@ PropertyParser.isPlanetaryBody = function (properties) {
*/
/**
* @typedef {Object} FileList
*
* JS {@link https://developer.mozilla.org/fr/docs/Web/API/FileList| FileList} API type
*
* @typedef {Object} FileList
*/
/**
* @typedef {Object} HiPSLocalFiles
*
* @property {File} properties - The local properties file of the HiPS
*
* @description
* Tiles are accessed like so: HIPSLocalFiles[norder][ipix] = {@link File};<br/>
* The properties file is accessed with: HIPSLocalFiles["properties"]
* @typedef {Object} HiPSLocalFiles
* @property {File} properties - The local properties file of the HiPS
*/

View File

@@ -222,8 +222,8 @@ export let MOC = (function() {
/**
* Serialize a MOC into different format
*
* @memberof Aladin
* @param {string} [format='json'] - The output format. Only json is currently supported but 'fits' could be added.
* @memberof MOC
* @param {string} [format='json'] - The output format. Only `json` is currently supported but `fits` could be added.
*/
MOC.prototype.serialize = function(format) {
if (!this.ready) {