From af9fd4ee77e977fe47b68866eb4e4bb9a4147698 Mon Sep 17 00:00:00 2001 From: Matthieu Baumann Date: Wed, 25 Sep 2024 22:14:10 +0200 Subject: [PATCH] add api examples link in the doc --- jsdoc.json | 11 ++++++++--- src/js/MOC.js | 17 ++++++++--------- src/js/Overlay.js | 9 ++++----- src/js/shapes/Polyline.js | 15 +++++++-------- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/jsdoc.json b/jsdoc.json index 96f340d8..43f9a36c 100644 --- a/jsdoc.json +++ b/jsdoc.json @@ -11,7 +11,6 @@ "dictionaries": ["jsdoc","closure"] }, "docdash": { - "navLevel": 2, "typedefs": true, "scripts": [ "jsdoc-custom-style.css", @@ -47,7 +46,13 @@ "class":"menu-item", "id":"website_link" }, - "Aladin Lite documentation": { + "API examples": { + "href":"https://aladin.cds.unistra.fr/AladinLite/doc/API/examples", + "target":"_blank", + "class":"menu-item", + "id":"website_link" + }, + "Documentation": { "href":"https://aladin.cds.unistra.fr/AladinLite/doc/", "target":"_blank", "class":"menu-item", @@ -59,7 +64,7 @@ "class":"menu-item", "id":"website_link" }, - "GitHub repo": { + "GitHub": { "href":"https://github.com/cds-astro/aladin-lite", "target":"_blank", "class":"menu-item", diff --git a/src/js/MOC.js b/src/js/MOC.js index 8ea9b102..b2263b1c 100644 --- a/src/js/MOC.js +++ b/src/js/MOC.js @@ -19,15 +19,14 @@ import { ALEvent } from "./events/ALEvent.js"; * @typedef {Object} MOCOptions * @description Options for configuring a MOC (Multi-Order-Coverage). * -* @property {Object} options - Configuration options for the MOC. -* @property {string} [options.name="MOC"] - The name of the catalog. -* @property {string} [options.color] - The color of the MOC HEALPix cell edges. -* @property {string} [options.fillColor] - A filling color of the MOC HEALPix cells. -* @property {string} [options.fill=false] - Fill the MOC with `options.fillColor` -* @property {string} [options.edge=true] - Draw the edges of the HEALPix cells with `options.color`. -* @property {number} [options.lineWidth=3] - The line width in pixels -* @property {Boolean} [options.perimeter=false] - A filling color of the MOC HEALPix cells. -* @property {number} [options.opacity=1.0] - The opacity of the MOC +* @property {string} [name="MOC"] - The name of the catalog. +* @property {string} [color] - The color of the MOC HEALPix cell edges. +* @property {string} [fillColor] - A filling color of the MOC HEALPix cells. +* @property {string} [fill=false] - Fill the MOC with `options.fillColor` +* @property {string} [edge=true] - Draw the edges of the HEALPix cells with `options.color`. +* @property {number} [lineWidth=3] - The line width in pixels +* @property {Boolean} [perimeter=false] - A filling color of the MOC HEALPix cells. +* @property {number} [opacity=1.0] - The opacity of the MOC */ export let MOC = (function() { diff --git a/src/js/Overlay.js b/src/js/Overlay.js index df837be6..aa747329 100644 --- a/src/js/Overlay.js +++ b/src/js/Overlay.js @@ -38,11 +38,10 @@ import { Color } from './Color'; * @typedef {Object} GraphicOverlayOptions * @description Options for configuring the graphic overlay * -* @property {Object} options - Configuration options for the MOC. -* @property {string} [options.name="overlay"] - The name of the catalog. -* @property {string} [options.color] - A string parsed as CSS value. See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/color_value| here} -* @property {number} [options.lineWidth=3] - The line width in pixels -* @property {Array.} [options.lineDash=[]] - Dash line option. See the segments property {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#segments| here} +* @property {string} [name="overlay"] - The name of the catalog. +* @property {string} [color] - A string parsed as CSS value. See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/color_value| here} +* @property {number} [lineWidth=3] - The line width in pixels +* @property {Array.} [lineDash=[]] - Dash line option. See the segments property {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#segments| here} */ export let GraphicOverlay = (function() { diff --git a/src/js/shapes/Polyline.js b/src/js/shapes/Polyline.js index 0fa9eb4e..d07acebd 100644 --- a/src/js/shapes/Polyline.js +++ b/src/js/shapes/Polyline.js @@ -41,14 +41,13 @@ import { ProjectionEnum } from "../ProjectionEnum.js"; * @typedef {Object} ShapeOptions * @description Options for describing a shape * -* @property {Object} options - Configuration options for the shape. -* @property {string} [options.color] - The color of the shape -* @property {string} [options.fill=false] - Fill the shape with fillColor -* @property {string} [options.fillColor] - A filling color for the shape -* @property {number} [options.lineWidth=3] - The line width in pixels -* @property {number} [options.opacity=1] - The opacity, between 0 (totally transparent) and 1 (totally opaque) -* @property {string} [options.selectionColor='#00ff00'] - A selection color -* @property {string} [options.hoverColor] - A hovered color +* @property {string} [color] - The color of the shape +* @property {string} [fill=false] - Fill the shape with fillColor +* @property {string} [fillColor] - A filling color for the shape +* @property {number} [lineWidth=3] - The line width in pixels +* @property {number} [opacity=1] - The opacity, between 0 (totally transparent) and 1 (totally opaque) +* @property {string} [selectionColor='#00ff00'] - A selection color +* @property {string} [hoverColor] - A hovered color */ export let Polyline = (function() {