Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small documentation improvements #4897

Merged
merged 1 commit into from
May 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 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:
* Used functionalities:
*
* * 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
7 changes: 2 additions & 5 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 functionalities:
*
* 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
27 changes: 22 additions & 5 deletions contribs/gmf/src/datasource/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ import olSourceTileWMS from 'ol/source/TileWMS.js';


/**
* The GeoMapFish DataSources Manager is responsible of listenening to the
* The GeoMapFish DataSources Manager is responsible of listening to the
* c2cgeoportal's themes to create instances of `ngeo.datasource.DataSource`
* objects with the layer definitions found and push them in the
* `DataSources` collection. The Manager must be initialized
* with the app's map using the setDatasourcseMap() method.
* with the app's map using the `setDatasourceMap()` method.
*
* When changing theme, these data sources are cleared then re-created.
*
* 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
22 changes: 11 additions & 11 deletions 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 All @@ -55,7 +55,7 @@ function forEachDisclaimer(layer, func) {
* @ngdoc controller
* @ngname GmfDisclaimerController
*/
function DisclamerController(
function DisclaimerController(
$element, $sce, $timeout, gettextCatalog, ngeoDisclaimer, ngeoEventHelper, ngeoLayerHelper
) {

Expand Down Expand Up @@ -149,7 +149,7 @@ function DisclamerController(
/**
* Initialise the controller.
*/
DisclamerController.prototype.$onInit = function() {
DisclaimerController.prototype.$onInit = function() {
this.layerVisibility = this.layerVisibility !== undefined ? this.layerVisibility : true;

this.dataLayerGroup_ = this.ngeoLayerHelper_.getGroupFromMap(this.map, DATALAYERGROUP_NAME);
Expand All @@ -160,7 +160,7 @@ DisclamerController.prototype.$onInit = function() {
* @param {import("ol/Collection.js").CollectionEvent} evt Event.
* @private
*/
DisclamerController.prototype.handleLayersAdd_ = function(evt) {
DisclaimerController.prototype.handleLayersAdd_ = function(evt) {
this.timeout_(() => {
const layer = evt.element;
console.assert(layer instanceof olLayerBase);
Expand All @@ -173,7 +173,7 @@ DisclamerController.prototype.handleLayersAdd_ = function(evt) {
* @param {import("ol/Collection.js").CollectionEvent} evt Event.
* @private
*/
DisclamerController.prototype.handleLayersRemove_ = function(evt) {
DisclaimerController.prototype.handleLayersRemove_ = function(evt) {
const layer = evt.element;
console.assert(layer instanceof olLayerBase);
this.unregisterLayer_(layer);
Expand All @@ -184,7 +184,7 @@ DisclamerController.prototype.handleLayersRemove_ = function(evt) {
* @param {import("ol/layer/Base.js").default} layer Layer.
* @private
*/
DisclamerController.prototype.registerLayer_ = function(layer) {
DisclaimerController.prototype.registerLayer_ = function(layer) {

const layerUid = olUtilGetUid(layer);

Expand Down Expand Up @@ -252,7 +252,7 @@ DisclamerController.prototype.registerLayer_ = function(layer) {
* @param {import("ol/layer/Base.js").default} layer Layer.
* @private
*/
DisclamerController.prototype.unregisterLayer_ = function(layer) {
DisclaimerController.prototype.unregisterLayer_ = function(layer) {

const layerUid = olUtilGetUid(layer);

Expand All @@ -275,7 +275,7 @@ DisclamerController.prototype.unregisterLayer_ = function(layer) {
};


DisclamerController.prototype.$onDestroy = function() {
DisclaimerController.prototype.$onDestroy = function() {
this.unregisterLayer_(this.dataLayerGroup_);
};

Expand All @@ -284,7 +284,7 @@ DisclamerController.prototype.$onDestroy = function() {
* @param {string} msg Disclaimer message.
* @private
*/
DisclamerController.prototype.showDisclaimerMessage_ = function(msg) {
DisclaimerController.prototype.showDisclaimerMessage_ = function(msg) {
msg = this.gettextCatalog_.getString(msg);
if (this.external) {
if (this.msgs_.indexOf(msg) < 0) {
Expand All @@ -307,7 +307,7 @@ DisclamerController.prototype.showDisclaimerMessage_ = function(msg) {
* @param {string} msg Disclaimer message.
* @private
*/
DisclamerController.prototype.closeDisclaimerMessage_ = function(msg) {
DisclaimerController.prototype.closeDisclaimerMessage_ = function(msg) {
msg = this.gettextCatalog_.getString(msg);
if (this.external) {
this.visibility = false;
Expand Down Expand Up @@ -376,7 +376,7 @@ DisclamerController.prototype.closeDisclaimerMessage_ = function(msg) {
* @ngname gmfDisclaimer
*/
const disclaimerComponent = {
controller: DisclamerController,
controller: DisclaimerController,
bindings: {
'layerVisibility': '<?gmfDisclaimerLayerVisibility',
'popup': '<?gmfDisclaimerPopup',
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/src/editing/editFeatureComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ 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.
* Example value: {'tolerance': 50, 'edge': false} For WMS layers.
*
* Example:
*
Expand Down
Loading