Skip to content

Commit

Permalink
Small documentation improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed May 13, 2019
1 parent b50062c commit 9ae5c75
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 33 deletions.
4 changes: 2 additions & 2 deletions contribs/gmf/src/backgroundlayerselector/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ function gmfBackgroundlayerselectorTemplateUrl($element, $attrs, gmfBackgroundla
*
* Used metadata:
*
* * thumbnail: The URL used for the icon.
* * `thumbnail`: The URL used for the icon.
*
* Used functionnalities:
*
* * default_basemap: Base maps to use by default.
* * `default_basemap`: Base maps to use by default.
*
* @htmlAttribute {import("ol/Map.js").default=} gmf-backgroundlayerselector-map The map.
* @htmlAttribute {string} gmf-backgroundlayer-opacity-options The opacity slider options.
Expand Down
5 changes: 1 addition & 4 deletions contribs/gmf/src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ import {ThemeEventType} from 'gmf/theme/Manager.js';
/**
* Application abstract controller.
*
* This file includes `goog.require` for base components/directives used
* by the HTML page and the controller to provide the configuration.
*
* Used functionnalities:
*
* * open_panel: When set, contains the name of the panel to open upon loading an application.
* * `open_panel`: When set, contains the name of the panel to open upon loading an application.
* Note: although this is a list, only one can be defined.
*
*
Expand Down
1 change: 1 addition & 0 deletions contribs/gmf/src/controllers/AbstractDesktopController.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ export class AbstractDesktopController extends AbstractAPIController {
* If, after resizing, the size of the data panel would be too big,
* resize it as well.
* @private
* @hidden
*/
setDataPanelMaxResizableWidth_() {

Expand Down
23 changes: 20 additions & 3 deletions contribs/gmf/src/datasource/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import olSourceTileWMS from 'ol/source/TileWMS.js';
*
* Used metadata:
*
* * identifierAttributeField: The field used in the 'display query window' as feature title.
* * `identifierAttributeField`: The field used in the 'display query window' as feature title.
* For WMS layers.
*/
export class DatasourceManager {
Expand Down Expand Up @@ -218,7 +218,9 @@ export class DatasourceManager {

/**
* Set the map to use with your datasources.
*
* @param {!import("ol/Map.js").default} map The map to use.
* @hidden
*/
setDatasourceMap(map) {
this.ngeoDataSources_.map = map;
Expand All @@ -227,6 +229,7 @@ export class DatasourceManager {
/**
* @param {!import('ngeo/datasource/OGC.js').Dimensions} dimensions A reference to the dimensions
* object to keep a reference of in this service.
* @hidden
*/
setDimensions(dimensions) {
if (this.dimensionsWatcherUnregister) {
Expand All @@ -246,6 +249,7 @@ export class DatasourceManager {
/**
* Called when the dimensions change. Update all affected layer's filters.
* @private
* @hidden
*/
handleDimensionsChange_() {

Expand Down Expand Up @@ -280,6 +284,7 @@ export class DatasourceManager {
* Called when the themes change. Remove any existing data sources first,
* then create and add data sources from the loaded themes.
* @private
* @hidden
*/
handleThemesChange_() {
// (1) Clear
Expand Down Expand Up @@ -340,6 +345,7 @@ export class DatasourceManager {
* @param {Array.<import("ngeo/layertree/Controller.js").LayertreeController>|undefined} value List of tree
* controllers.
* @private
* @hidden
*/
handleTreeManagerRootChildrenChange_(value) {

Expand Down Expand Up @@ -389,6 +395,7 @@ export class DatasourceManager {
* Remove the data sources from the ngeo collection that are in the cache,
* i.e. those created by this service, then clear the cache.
* @private
* @hidden
*/
clearDataSources_() {

Expand Down Expand Up @@ -420,6 +427,7 @@ export class DatasourceManager {
* may have children or not.
* @param {!import('gmf/themes.js').GmfOgcServers} ogcServers OGC servers.
* @private
* @hidden
*/
createDataSource_(firstLevelGroup, node, ogcServers) {

Expand Down Expand Up @@ -605,6 +613,7 @@ export class DatasourceManager {
*
* @param {import("ngeo/layertree/Controller.js").LayertreeController} treeCtrl Layertree controller to add
* @private
* @hidden
*/
addTreeCtrlToCache_(treeCtrl) {

Expand Down Expand Up @@ -667,9 +676,9 @@ export class DatasourceManager {
* Remove a treeCtrl cache item. Unregister event listeners and remove the
* data source from the ngeo collection.
*
* @param {ManagerTreeCtrlCacheItem} item Layertree
* controller cache item
* @param {ManagerTreeCtrlCacheItem} item Layertree controller cache item
* @private
* @hidden
*/
removeTreeCtrlCacheItem_(item) {

Expand Down Expand Up @@ -697,6 +706,7 @@ export class DatasourceManager {
*
* The data source gets also removed from the ngeo data sources collection.
* @private
* @hidden
*/
clearTreeCtrlCache_() {
for (const id in this.treeCtrlCache_) {
Expand All @@ -715,6 +725,7 @@ export class DatasourceManager {
* @param {import("ngeo/layertree/Controller.js").LayertreeController} treeCtrl The layer tree controller
* @param {string|undefined} newVal New state value
* @private
* @hidden
*/
handleTreeCtrlStateChange_(treeCtrl, newVal) {
const treeDataSource = treeCtrl.getDataSource();
Expand All @@ -738,6 +749,7 @@ export class DatasourceManager {
* @param {import("ngeo/layertree/Controller.js").LayertreeController} treeCtrl The layer tree controller
* @return {ManagerTreeCtrlCacheItem} Cache item
* @private
* @hidden
*/
getTreeCtrlCacheItem_(treeCtrl) {
return this.treeCtrlCache_[olUtilGetUid(treeCtrl.node)] || null;
Expand All @@ -748,6 +760,7 @@ export class DatasourceManager {
* @param {!import("ngeo/datasource/DataSource.js").default} dataSource The data source.
* @return {import("ol/layer/Base.js").default|undefined} The layer.
* @private
* @hidden
*/
getDataSourceLayer_(dataSource) {
const gmfOGCDataSource = /** @type {!import("gmf/datasource/OGC.js").default} */ (dataSource);
Expand All @@ -771,6 +784,7 @@ export class DatasourceManager {
* and dimensions filters.
* @param {import("ol/layer/Base.js").default} layer The layer to update.
* @private
* @hidden
*/
updateLayerFilter_(layer) {
console.assert(
Expand Down Expand Up @@ -845,6 +859,7 @@ export class DatasourceManager {
*
* @param {!import("gmf/datasource/OGC.js").default} dataSource Data source.
* @private
* @hidden
*/
handleDataSourceFilterRulesChange_(dataSource) {

Expand Down Expand Up @@ -873,6 +888,7 @@ export class DatasourceManager {
*
* @param {!import("gmf/datasource/OGC.js").default} dataSource Data source.
* @private
* @hidden
*/
handleDataSourceTimeValueChange_(dataSource) {

Expand Down Expand Up @@ -915,6 +931,7 @@ export class DatasourceManager {
*
* @param {!import('ngeo/map/BackgroundLayerMgr.js').BackgroundEvent} evt Event.
* @private
* @hidden
*/
handleNgeoBackgroundLayerChange_(evt) {

Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/src/disclaimer/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function forEachDisclaimer(layer, func) {
/**
* Used metadata:
*
* * disclaimer: The disclaimer text for this element.
* * `disclaimer`: The disclaimer text for this element.
* For WMS and WMTS layers, layer groups and themes.
*
* @param {!JQuery} $element Element.
Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/src/editing/editFeatureComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ module.run(/* @ngInject */ ($templateCache) => {
*
* Used metadata:
*
* * enumeratedAttributes: List of attribute names which have enumerated attribute
* * `enumeratedAttributes`: List of attribute names which have enumerated attribute
* values (for filters purpose). For WMS layers.
* * snappingConfig: The snapping configuration for the leaf. If set, the leaf's layer is considered to be
* * `snappingConfig`: The snapping configuration for the leaf. If set, the leaf's layer is considered to be
* "snappable", even if the config itself is empty.
* Example of value: {'tolerance': 50, 'edge': false} For WMS layers.
*
Expand Down
25 changes: 22 additions & 3 deletions contribs/gmf/src/filters/filterselectorComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ function gmfFilterselectorTemplateUrl($attrs, gmfFilterselectorTemplateUrl) {
*
* Used metadata:
*
* * directedFilterAttributes: List of attribute names which should have rules
* * `directedFilterAttributes`: List of attribute names which should have rules
* already ready when using the filter tools. For WMS layers.
*
* Used functionnalities:
*
* * preset_layer_filter: Name of the layer (data source) that should be toggled in the filter tool upon
* * `preset_layer_filter`: Name of the layer (data source) that should be toggled in the filter tool upon
* loading an application.
* Note: although this is a list, only one can be defined.
* * filterable_layers: A list of layer names that can be filtered, if empty the component will be hidden.
* * `filterable_layers`: A list of layer names that can be filtered, if empty the component will be hidden.
*/
class FilterSelectorController {

Expand Down Expand Up @@ -316,6 +316,7 @@ class FilterSelectorController {

/**
* @private
* @hidden
*/
handleGmfUserFunctionalitiesChange_() {
const usrFunc = this.gmfUser_.functionalities;
Expand All @@ -335,6 +336,7 @@ class FilterSelectorController {

/**
* @private
* @hidden
*/
toggleDataSourceRegistration_() {
const newDataSourceRegistration = !!this.filtrableLayerNodeNames_;
Expand All @@ -349,6 +351,7 @@ class FilterSelectorController {
* Also, when deactivated, deselect data source.
* @param {boolean} active Active.
* @private
* @hidden
*/
handleActiveChange_(active) {
if (!active) {
Expand All @@ -363,6 +366,7 @@ class FilterSelectorController {
/**
* @param {boolean} register Whether register the data sources or not.
* @private
* @hidden
*/
handleEnableDataSourceRegistrationChange_(register) {
const keys = this.listenerKeys_;
Expand Down Expand Up @@ -394,6 +398,7 @@ class FilterSelectorController {
*
* @param {import("ol/Collection.js").CollectionEvent} evt Collection event.
* @private
* @hidden
*/
handleDataSourcesAdd_(evt) {
const dataSource = evt.element;
Expand All @@ -410,6 +415,7 @@ class FilterSelectorController {
*
* @param {import("ol/Collection.js").CollectionEvent} evt Collection event.
* @private
* @hidden
*/
handleDataSourcesRemove_(evt) {
const dataSource = evt.element;
Expand All @@ -426,6 +432,7 @@ class FilterSelectorController {
*
* @param {import("gmf/datasource/OGC.js").default} dataSource Data source
* @private
* @hidden
*/
registerDataSource_(dataSource) {
if (dataSource.filtrable === null) {
Expand All @@ -449,6 +456,7 @@ class FilterSelectorController {
* that was currently selected, deselect it.
* @param {import("gmf/datasource/OGC.js").default} dataSource Data source
* @private
* @hidden
*/
unregisterDataSource_(dataSource) {
if (dataSource.filtrable) {
Expand Down Expand Up @@ -483,6 +491,7 @@ class FilterSelectorController {
* @return {boolean} Whether the data source is valid to add to the list or
* not.
* @private
* @hidden
*/
isDataSourceFiltrable_(dataSource, opt_notify) {
let filtrable = true;
Expand Down Expand Up @@ -545,6 +554,7 @@ class FilterSelectorController {
/**
* @param {?import("gmf/datasource/OGC.js").default} dataSource Newly selected data source object.
* @private
* @hidden
*/
handleSelectedDataSourceChange_(dataSource) {

Expand Down Expand Up @@ -602,6 +612,7 @@ class FilterSelectorController {
* @param {import("ngeo/datasource/DataSource.js").default} dataSource Data source.
* @return {?RuleCacheItem} Rule cache item.
* @private
* @hidden
*/
getRuleCacheItem_(dataSource) {
return this.ruleCache_[dataSource.id] || null;
Expand All @@ -611,18 +622,21 @@ class FilterSelectorController {
* @param {import("ngeo/datasource/DataSource.js").default} dataSource Data source.
* @param {RuleCacheItem} item Rule cache item.
* @private
* @hidden
*/
setRuleCacheItem_(dataSource, item) {
this.ruleCache_[dataSource.id] = item;
}

/**
* @hidden
*/
saveFilterShowModal() {
this.saveFilterSaveModalShown = true;
}

/**
* @hidden
*/
saveFilterSave() {

Expand Down Expand Up @@ -661,7 +675,9 @@ class FilterSelectorController {

/**
* Load a saved filter item, replacing the current rules.
*
* @param {!import("gmf/filters/SavedFilters.js").SavedFilterItem} filterItem Filter item.
* @hidden
*/
saveFilterLoadItem(filterItem) {

Expand Down Expand Up @@ -694,14 +710,17 @@ class FilterSelectorController {
}

/**
* @hidden
*/
saveFilterManage() {
this.saveFilterManageModalShown = true;
}

/**
* Remove a saved filter item.
*
* @param {!import("gmf/filters/SavedFilters.js").SavedFilterItem} item Filter item.
* @hidden
*/
saveFilterRemoveItem(item) {
this.gmfSavedFilters.remove(item);
Expand Down
Loading

0 comments on commit 9ae5c75

Please sign in to comment.