Skip to content

Commit

Permalink
Add existing plugins documentation to docma. #3845 (#3893)
Browse files Browse the repository at this point in the history
  • Loading branch information
offtherailz authored Jul 2, 2019
1 parent 1bb78b8 commit 047599c
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 33 deletions.
28 changes: 21 additions & 7 deletions build/docma-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
"web/client/reducers/maptype.js",
"web/client/reducers/notifications.js",
"web/client/reducers/search.js",
"web/client/reducers/timeline.js",

"web/client/epics/index.jsdoc",
"web/client/epics/automapupdate.js",
Expand Down Expand Up @@ -203,23 +204,28 @@
"web/client/plugins/BackgroundSelector.jsx",
"web/client/plugins/BackgroundSwitcher.jsx",
"web/client/plugins/CreateNewMap.jsx",
"web/client/plugins/ContentTabs.jsx",
"web/client/plugins/CRSSelector.jsx",
"web/client/plugins/DrawerMenu.jsx",
"web/client/plugins/FeaturedMaps.jsx",
"web/client/plugins/FeatureEditor.jsx",
"web/client/plugins/FeedbackMask.jsx",
"web/client/plugins/FloatingLegend.jsx",
"web/client/plugins/FullScreen.jsx",
"web/client/plugins/GlobeViewSwitcher.jsx",
"web/client/plugins/GoFull.jsx",
"web/client/plugins/Identify",
"web/client/plugins/Locate",
"web/client/plugins/Login",
"web/client/plugins/Map.jsx",
"web/client/plugins/MapSearch.jsx",
"web/client/plugins/Measure.jsx",
"web/client/plugins/MeasurePanel.jsx",
"web/client/plugins/MeasureResults.jsx",
"web/client/plugins/FullScreen.jsx",
"web/client/plugins/Identify.jsx",
"web/client/plugins/FloatingLegend.jsx",
"web/client/plugins/Locate.jsx",
"web/client/plugins/Login.jsx",
"web/client/plugins/MetadataExplorer.jsx",
"web/client/plugins/MousePosition.jsx",
"web/client/plugins/Notifications.jsx",
"web/client/plugins/Playback.jsx",
"web/client/plugins/Print.jsx",
"web/client/plugins/QueryPanel.jsx",
"web/client/plugins/RulesEditor.jsx",
Expand All @@ -228,17 +234,25 @@
"web/client/plugins/ScrollTop.jsx",
"web/client/plugins/Search.jsx",
"web/client/plugins/SearchServicesConfig.jsx",
"web/client/plugins/Share.jsx",
"web/client/plugins/StyleEditor.jsx",
"web/client/plugins/ThematicLayer.jsx",
"web/client/plugins/Timeline.jsx",
"web/client/plugins/TOC.jsx",
"web/client/plugins/TOCItemsSettings.jsx",
"web/client/plugins/ThematicLayer.jsx",
"web/client/plugins/Tutorial.jsx",
"web/client/plugins/Version.jsx",
"web/client/plugins/WFSDownload.jsx",
"web/client/plugins/Widgets.jsx",
"web/client/plugins/WidgetsBuilder.jsx",
"web/client/plugins/WidgetsTray.jsx",
"web/client/plugins/ZoomIn.jsx",
"web/client/plugins/ZoomOut.jsx",

"web/client/product/pages/index.jsdoc",
"web/client/product/pages/RulesManager.jsx"
"web/client/product/pages/RulesManager.jsx",

"web/client/product/product/NavMenu.jsx"
]
}
]
Expand Down
34 changes: 13 additions & 21 deletions web/client/plugins/Identify.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,18 @@ const identifyDefaultProps = defaultProps({
});

/**
* Identify plugin. This plugin allows to perform get feature info.
* It can be configured to have a mobile or a desktop flavor.
* It's enabled by default. The bubbling of an on_click_map action to GFI is stopped
* if Annotations or FeatureGrid plugins are editing, draw or measurement supports are
* active, the query panel is active or the identify plugin is disabled.
* To restore old behavior, in mapInfo state, set disabledAlwaysOn to true and
* manage the plugin using toggleControl action with 'info' as control name.
* It's possible also possible disable the plugin by changeMapInfoState or toggleMapInfoState actions
* This plugin allows get informations about clicked point. It can be configured to have a mobile or a desktop flavor.
*
* You can configure some of the features of this plugin by setting up the initial mapInfo state, then you need to update the "initialState.defaultState", or by the plugin configuration
* ```
* "mapInfo": {
* "enabled": true, // enabled by default
* "disabledAlwaysOn": false, // if true, disable always on setup
* "configuration": {
* "showEmptyMessageGFI": false // allow or deny the visiibility of message when you have no results from identify request
* }
* }
* ```
*
* @class Identify
* @memberof plugins
Expand All @@ -149,10 +153,9 @@ const identifyDefaultProps = defaultProps({
* @prop showIn {string[]} List of the plugins where to show the plugin
* @prop cfg.dock {bool} true shows dock panel, false shows modal
* @prop cfg.draggable {boolean} draggable info window, when modal
* @prop cfg.viewerOptions {object}
* @prop cfg.showHighlightFeatureButton {boolean} show the highlight feature button if the interrogation returned valid features (openlayers only)
* @prop cfg.viewerOptions.container {expression} the container of the viewer, expression from the context
* @prop cfg.viewerOptions.header {expression} the geader of the viewer, expression from the context{expression}
* @prop cfg.viewerOptions.header {expression} the header of the viewer, expression from the context{expression}
* @prop cfg.disableCenterToMarker {bool} disable zoom to marker action
* @prop cfg.zIndex {number} component z index order
*
Expand All @@ -170,17 +173,6 @@ const identifyDefaultProps = defaultProps({
* }
* }
*
* If you want ot configure the showEmptyMessageGFI you need to update the "initialState.defaultState"
* @example
* ```
* "mapInfo": {
* "enabled": true,
* "configuration": {
* "showEmptyMessageGFI": false
* }
* }
* ```
*/

const IdentifyPlugin = compose(
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/MetadataExplorer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const API = {
wmts: require('../api/WMTS')
};
/**
* MetadataExplorer plugin. Shows the catalogs results (CSW, WMS and WMTS).
* MetadataExplorer (Catalog) plugin. Shows the catalogs results (CSW, WMS and WMTS).
* Some useful flags in `localConfig.json`:
* - `noCreditsFromCatalog`: avoid add credits (attribution) from catalog
*
Expand Down
6 changes: 6 additions & 0 deletions web/client/plugins/Playback.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ const Playback = compose(
)
)(require('./playback/Playback'));

/**
* Playback Plugin. Shows the playback controls for @see {@link api/plugins#plugins.Timeline}
* @class Playback
* @memberof plugins
* @static
*/
class PlaybackPlugin extends React.Component {
render() {
return (
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/QueryPanel.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2016, GeoSolutions Sas.
* All rights reserved.
*
Expand Down
4 changes: 3 additions & 1 deletion web/client/plugins/Timeline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ const getPercent = (val) => parseInt(val, 10) / 100;
const isValidOffset = (start, end) => moment(end).diff(start) > 0;

/**
* Timeline Plugin. Shows the timeline tool on the map
* Timeline Plugin. Shows the timeline tool on the map.
* To use with Playback plugin. {@link api/plugins#plugins.Playback}
* For configuration, see related reducer's documentation {@link api/framework#reducers.timeline}
* @class Timeline
* @memberof plugins
* @static
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/Version.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {versionSelector} = require('../selectors/version');
const Message = require('../components/I18N/Message');

/**
* Version Plugin. Shows current MapStore2 version
* Version Plugin. Shows current MapStore2 version in settings panel
* @class Version
* @memberof plugins
* @static
Expand Down
8 changes: 7 additions & 1 deletion web/client/plugins/WidgetsBuilder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ class SideBarComponent extends React.Component {

}
}

/**
* Editor for map widgets
* @memberof plugins
* @name WidgetsBuilder
* @class
*
*/
const Plugin = connect(
createSelector(
widgetBuilderSelector,
Expand Down

0 comments on commit 047599c

Please sign in to comment.