diff --git a/docma-config.json b/docma-config.json index 97552b51e2..3044ab3b48 100644 --- a/docma-config.json +++ b/docma-config.json @@ -134,6 +134,7 @@ "web/client/epics/search.js", "web/client/utils/index.jsdoc", + "web/client/utils/CoordinatesUtils.js", "web/client/utils/PluginsUtils.js", "web/client/utils/ShareUtils.js" ], @@ -150,9 +151,13 @@ "web/client/plugins/MeasureResults.jsx", "web/client/plugins/FullScreen.jsx", "web/client/plugins/Identify.jsx", + "web/client/plugins/Locate.jsx", "web/client/plugins/Login.jsx", + "web/client/plugins/ScaleBox.jsx", "web/client/plugins/ScrollTop.jsx", - "web/client/plugins/Search.jsx" + "web/client/plugins/Search.jsx", + "web/client/plugins/ZoomIn.jsx", + "web/client/plugins/ZoomOut.jsx" ] }, "./docs/**/*md", diff --git a/web/client/epics/index.jsdoc b/web/client/epics/index.jsdoc index 3bce386328..da77fcc1c0 100644 --- a/web/client/epics/index.jsdoc +++ b/web/client/epics/index.jsdoc @@ -3,3 +3,8 @@ * @see {@link https://redux-observable.js.org/docs/basics/Epics.html|the redux-observable documentation} for details * @name epics */ + /** + * @external Observable + * @description A RxJS Observable + * @see {@link http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html|Observable} + */ diff --git a/web/client/plugins/DrawerMenu.jsx b/web/client/plugins/DrawerMenu.jsx index d39b7ab1df..bdefbb3e95 100644 --- a/web/client/plugins/DrawerMenu.jsx +++ b/web/client/plugins/DrawerMenu.jsx @@ -1,4 +1,4 @@ -/** +/* * Copyright 2016, GeoSolutions Sas. * All rights reserved. * diff --git a/web/client/plugins/Locate.jsx b/web/client/plugins/Locate.jsx index fda906b30f..f3a704b32b 100644 --- a/web/client/plugins/Locate.jsx +++ b/web/client/plugins/Locate.jsx @@ -1,4 +1,4 @@ -/** +/* * Copyright 2016, GeoSolutions Sas. * All rights reserved. * @@ -16,6 +16,19 @@ const {Glyphicon} = require('react-bootstrap'); const assign = require('object-assign'); +/** + * Locate Plugin. Provides button to locate the user's position on the map. + * By deafault it will follow the user until he moves the map. He can click again to + * restore the following mode. + * @class Locate + * @memberof plugins + * @static + * + * @prop {string} cfg.style CSS to apply to the button + * @prop {string} cfg.text The button text, if any + * @prop {string} cfg.className the class name for the button + * + */ const LocatePlugin = connect((state) => ({ locate: state.locate && state.locate.state || 'DISABLED' }), { diff --git a/web/client/plugins/ScaleBox.jsx b/web/client/plugins/ScaleBox.jsx index c98b76091c..1cb4fc9c31 100644 --- a/web/client/plugins/ScaleBox.jsx +++ b/web/client/plugins/ScaleBox.jsx @@ -1,4 +1,4 @@ -/** +/* * Copyright 2016, GeoSolutions Sas. * All rights reserved. * @@ -30,6 +30,18 @@ const selector = createSelector([mapSelector], (map) => ({ require('./scalebox/scalebox.css'); +/** + * ScaleBox Plugin. Provides a selector for the scale of the map. + * @class ScaleBox + * @memberof plugins + * @static + * + * @prop {object} cfg.style CSS to apply to the scalebox + * @prop {Boolean} cfg.readOnly the selector is readonly + * @prop {string} cfg.label label for the selector + * @prop {Boolean} cfg.useRawInput set true if you want to use an normal html input object + * + */ const ScaleBoxPlugin = React.createClass({ render() { return ( (state.map && state.map.present) || (state.map) || (state.config && state.config.map) || null; const projectionSelector = createSelector([mapSelector], (map) => map && map.projection); - +/** + * Get the scales of the current map + * @function + * @memberof selectors.map + * @param {object} state the state + * @return {number[]} the scales of the map + */ const scalesSelector = createSelector( [projectionSelector], (projection) => { diff --git a/web/client/utils/CoordinatesUtils.js b/web/client/utils/CoordinatesUtils.js index bb79e7529c..3ee29dc62b 100644 --- a/web/client/utils/CoordinatesUtils.js +++ b/web/client/utils/CoordinatesUtils.js @@ -1,10 +1,11 @@ -/** +/* * Copyright 2015, GeoSolutions Sas. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ + const Proj4js = require('proj4'); const proj4 = Proj4js; const assign = require('object-assign'); @@ -48,7 +49,10 @@ function determineCrs(crs) { } return crs; } - +/** + * Utilities for Coordinates conversion. + * @memberof utils + */ const CoordinatesUtils = { getUnits: function(projection) { const proj = new Proj4js.Proj(projection); @@ -126,11 +130,9 @@ const CoordinatesUtils = { }, /** * Reprojects a bounding box. - * * @param bbox {array} [minx, miny, maxx, maxy] * @param source {string} SRS of the given bbox * @param dest {string} SRS of the returned bbox - * * @return {array} [minx, miny, maxx, maxy] */ reprojectBbox: function(bbox, source, dest, normalize = true) { diff --git a/web/client/utils/PluginsUtils.js b/web/client/utils/PluginsUtils.js index 97697fe74b..fe5745f311 100644 --- a/web/client/utils/PluginsUtils.js +++ b/web/client/utils/PluginsUtils.js @@ -155,7 +155,6 @@ const defaultEpicWrapper = epic => (...args) => }); /** * Utilities to manage plugins - * @class * @memberof utils */ const PluginsUtils = { diff --git a/web/client/utils/ShareUtils.js b/web/client/utils/ShareUtils.js index 3ee231445c..e00a248f35 100644 --- a/web/client/utils/ShareUtils.js +++ b/web/client/utils/ShareUtils.js @@ -8,9 +8,8 @@ const Url = require('url'); /** - * Utility functions for Share tools + * Utility functions for Share tools. * @memberof utils - * @type {Object} */ var ShareUtils = { /**