diff --git a/.gitattributes b/.gitattributes
index 1151fa3f24e..6acaaad4ed5 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -8,3 +8,4 @@ Makefile* text whitespace=indent-with-non-tab,tabwidth=2 eol=lf
*.gif binary
*.ico binary
*.enc binary
+*.cur binary
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index d63da101a70..52706362ed3 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -3,7 +3,7 @@ To check before create a new issue:
* I am using the latest minor version of the major version (`x.y.last`).
* I create one issue per subject (do not put more than one thing in the same issue).
-For commiters:
+For committers:
* I have assigned a blue and a green label.
* I have assigned a milestone.
diff --git a/.gitignore b/.gitignore
index ab1d060bd55..7f327c11f47 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,7 +16,6 @@
/contribs/gmf/fonts/gmf-icons.woff
/contribs/gmf/fonts/FontAwesome*
/contribs/gmf/fonts/fontawesome*
-/contribs/gmf/cursors/*.cur
/contribs/gmf/examples/https.js
/test/spec/templatecache.js
/test/spec/gmftemplatecache.js
diff --git a/Makefile b/Makefile
index fa5be0aa8f4..560edd5d72e 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ NGEO_EXAMPLES_JS_FILES := $(NGEO_EXAMPLES_HTML_FILES:.html=.js)
GMF_PARTIALS_FILES := $(shell find contribs/gmf/src/ -name *.html)
GMF_JS_FILES := $(shell find contribs/gmf/src/ -type f -name '*.js')
-GMF_ALL_SRC_FILES := $(shell find contribs/gmf/src/ -type f) $(NGEO_ALL_SRC_FILES)
+GMF_ALL_SRC_FILES := $(shell find contribs/gmf/src/ -type f) $(shell find contribs/gmf/cursors/ -type f) $(NGEO_ALL_SRC_FILES)
GMF_TEST_JS_FILES := $(shell find contribs/gmf/test/ -type f -name '*.js')
GMF_EXAMPLES_HTML_FILES := $(shell ls -1 contribs/gmf/examples/*.html)
GMF_EXAMPLES_JS_FILES := $(GMF_EXAMPLES_HTML_FILES:.html=.js)
@@ -110,8 +110,8 @@ help:
@echo "- test Run the test suite"
@echo "- test-debug Run the test suite in the browser"
@echo "- clean Remove generated files"
- @echo "- cleanall Remove all the build artefacts"
- @echo "- cleanallcache Remove all the build artefacts and the extra caches (npm and pip)"
+ @echo "- cleanall Remove all the build artifacts"
+ @echo "- cleanallcache Remove all the build artifacts and the extra caches (npm and pip)"
@echo
@echo "Secondary targets:"
@echo
@@ -124,7 +124,7 @@ help:
apidoc: .build/apidoc
.PHONY: check
-check: lint check-examples-checker check-examples test examples-hosted-apps
+check: lint spell check-examples-checker check-examples test examples-hosted-apps
.PHONY: check-examples-checker
check-example-checker: $(CHECK_EXAMPLE_CHECKER)
@@ -140,6 +140,14 @@ lint-extra:
if [ "`git grep @fileoverview src contribs`" != "" ]; then echo "Using @fileoverview breaks the documentation main page"; false; fi
if [ "`git grep @example src contribs`" != "" ]; then echo "We don't use @example to have the example in the description"; false; fi
+.PHONY: spell
+spell: .build/python-venv.timestamp
+ $(PY_VENV_BIN)/codespell --quiet-level=2 --ignore-words=spell-ignore-words.txt \
+ $(shell find -name 'node_modules' -prune -or -name '.build' -prune -or -name '.git' -prune \
+ -or -name '__pycache__' -prune -or -name 'build' -prune \
+ -or \( -type f -and -not -name '*.png' -and -not -name '*.mo' -and -not -name '*.po*' -and -not -name '*_translation' \
+ -and -not -name 'themescapabilities.js' -and -not -name 'themes.js' -and -not -name 'prettify.js' \) -print)
+
.PHONY: eslint
eslint: .build/eslint.timestamp
@@ -153,7 +161,7 @@ eof-newline:
.PHONY: test
test: .build/node_modules.timestamp
- ./node_modules/karma/bin/karma start karma-conf.js --single-run
+ THEME=mobile ./node_modules/karma/bin/karma start karma-conf.js --single-run
@echo "\nFull coverage report in: .build/coverage/lcov-report"
.PHONY: test-debug
@@ -171,7 +179,7 @@ serve-ngeo: .build/node_modules.timestamp $(FONTAWESOME_WEBFONT) $(ANGULAR_LOCAL
.PHONY: serve-gmf
serve-gmf: .build/node_modules.timestamp $(FONTAWESOME_WEBFONT) $(ANGULAR_LOCALES_FILES)
- npm run serve-gmf-examples
+ THEME=mobile npm run serve-gmf-examples
.PHONY: serve-gmf-apps-desktop
serve-gmf-apps-desktop: .build/node_modules.timestamp $(FONTAWESOME_WEBFONT) $(ANGULAR_LOCALES_FILES)
@@ -183,11 +191,11 @@ serve-gmf-apps-desktopalt: .build/node_modules.timestamp $(FONTAWESOME_WEBFONT)
.PHONY: serve-gmf-apps-mobile
serve-gmf-apps-mobile: .build/node_modules.timestamp $(FONTAWESOME_WEBFONT) $(ANGULAR_LOCALES_FILES)
- APP=mobile npm run serve-gmf-apps
+ APP=mobile npm THEME=mobile run serve-gmf-apps
.PHONY: serve-gmf-apps-mobilealt
serve-gmf-apps-mobilealt: .build/node_modules.timestamp $(FONTAWESOME_WEBFONT) $(ANGULAR_LOCALES_FILES)
- APP=mobile_alt npm run serve-gmf-apps
+ APP=mobile_alt THEME=mobile npm run serve-gmf-apps
.PHONY: serve-gmf-apps-oeedit
serve-gmf-apps-oeedit: .build/node_modules.timestamp $(FONTAWESOME_WEBFONT) $(ANGULAR_LOCALES_FILES)
@@ -214,7 +222,7 @@ examples-hosted-ngeo: .build/examples-ngeo.timestamp .build/examples-hosted/inde
examples-hosted-gmf: .build/examples-gmf.timestamp .build/examples-hosted/contribs/gmf/index.html
.build/examples-gmf.timestamp: $(GMF_ALL_SRC_FILES) $(WEBPACK_CONFIG_FILES) .build/node_modules.timestamp
- npm run build-gmf-examples
+ THEME=mobile npm run build-gmf-examples
touch $@
.PHONY: examples-hosted-apps
@@ -223,8 +231,8 @@ examples-hosted-apps: .build/gmf-apps.timestamp .build/examples-hosted-gmf-apps-
.build/gmf-apps.timestamp: $(GMF_APPS_ALL_SRC_FILES) $(WEBPACK_CONFIG_FILES) .build/node_modules.timestamp
APP=desktop THEME=desktop npm run build-gmf-apps
APP=desktop_alt THEME=desktop_alt npm run build-gmf-apps
- APP=mobile npm run build-gmf-apps
- APP=mobile_alt npm run build-gmf-apps
+ APP=mobile THEME=mobile npm run build-gmf-apps
+ APP=mobile_alt THEME=mobile npm run build-gmf-apps
APP=oeedit THEME=desktop npm run build-gmf-apps
APP=oeview THEME=desktop npm run build-gmf-apps
touch $@
@@ -246,8 +254,7 @@ gh-pages: .build/python-venv.timestamp
.build/examples-hosted-gmf-apps-deps.timestamp: \
$(addprefix contribs/gmf/build/gmf-, $(addsuffix .json, $(LANGUAGES))) \
- $(addprefix contribs/gmf/build/angular-locale_, $(addsuffix .js, $(LANGUAGES))) \
- $(addprefix contribs/gmf/cursors/,grab.cur grabbing.cur)
+ $(addprefix contribs/gmf/build/angular-locale_, $(addsuffix .js, $(LANGUAGES)))
mkdir -p .build/examples-hosted/contribs/gmf
# We need the files for each app
# To simplify processing, we first copy them in gmfappsdeps directory, then from there to each app
@@ -338,10 +345,6 @@ contribs/gmf/build/angular-locale_%.js: package.json
rm -rf $@
./node_modules/.bin/jsdoc -c $< --destination $@
-.PRECIOUS: contribs/gmf/cursors/%.cur
-contribs/gmf/cursors/%.cur: contribs/gmf/cursors/%.png
- convert $< $@
-
# i18n
diff --git a/buildtools/check-example.js b/buildtools/check-example.js
index 2a16ce1f443..ef2d75d2bb6 100644
--- a/buildtools/check-example.js
+++ b/buildtools/check-example.js
@@ -37,12 +37,12 @@ page.onAlert = function(msg) {
};
page.onResourceError = function(resourceError) {
if (resourceError.url.includes('tile.openstreetmap.org')) {
- console.warn('Ignoring ressource error from OpenStreetMap');
+ console.warn('Ignoring resource error from OpenStreetMap');
} else if (resourceError.url.includes('https://maps.googleapis.com/maps/api/js')) {
- console.warn('Ignoring ressource error from Google');
+ console.warn('Ignoring resource error from Google');
} else if (resourceError.url.includes('https://csi.gstatic.com/')) {
- console.warn('Ignoring ressource error from Google static');
- } else if (resourceError.errorCode >= 300) {
+ console.warn('Ignoring resource error from Google static');
+ } else if (resourceError.errorCode >= 400) {
console.log('Resource error: ' + resourceError.errorCode + ', ' + resourceError.url);
exitCode = 2;
}
diff --git a/buildtools/webpack.commons.js b/buildtools/webpack.commons.js
index c994f4bba32..fdf185f8c34 100644
--- a/buildtools/webpack.commons.js
+++ b/buildtools/webpack.commons.js
@@ -7,6 +7,7 @@ const LessPluginAutoprefix = require('less-plugin-autoprefix');
const devMode = process.env.NODE_ENV !== 'production'
const themes = {
+ 'mobile': '"~gmf/controllers/mobile-theme.less"',
'desktop': '"~gmf/controllers/desktop-theme.less"',
'desktop_alt': '"' + path.resolve('contribs/gmf/apps/desktop_alt/less/theme.less') + '"',
}
@@ -127,7 +128,7 @@ const cssLessLoaderConfigs = [
new LessPluginAutoprefix()
],
modifyVars: {
- 'THEME': themes[theme],
+ 'THEME': themes[theme] ? themes[theme] : theme,
}
}
}
diff --git a/contribs/gmf/apps/desktop/Controller.js b/contribs/gmf/apps/desktop/Controller.js
index be91a5bb194..5eccaf3c7c0 100644
--- a/contribs/gmf/apps/desktop/Controller.js
+++ b/contribs/gmf/apps/desktop/Controller.js
@@ -14,6 +14,8 @@ import appBase from '../appmodule.js';
import ngeoProjEPSG2056 from 'ngeo/proj/EPSG2056.js';
import ngeoProjEPSG21781 from 'ngeo/proj/EPSG21781.js';
import * as olBase from 'ol/index.js';
+import Raven from 'raven-js/src/raven.js';
+import RavenPluginsAngular from 'raven-js/plugins/angular.js';
if (!window.requestAnimationFrame) {
alert('Your browser is not supported, please update it or use another one. You will be redirected.\n\n'
@@ -97,6 +99,14 @@ const exports = function($scope, $injector) {
gettextCatalog.getString('Add a theme');
gettextCatalog.getString('Add a sub theme');
gettextCatalog.getString('Add a layer');
+
+ if ($injector.has('sentryUrl')) {
+ const options = $injector.has('sentryOptions') ? $injector.get('sentryOptions') : undefined;
+ const raven = new Raven();
+ raven.config($injector.get('sentryUrl'), options)
+ .addPlugin(RavenPluginsAngular)
+ .install();
+ }
};
olBase.inherits(exports, gmfControllersAbstractDesktopController);
diff --git a/contribs/gmf/apps/desktop_alt/Controller.js b/contribs/gmf/apps/desktop_alt/Controller.js
index 5a628ce4ae1..229ed8284b0 100644
--- a/contribs/gmf/apps/desktop_alt/Controller.js
+++ b/contribs/gmf/apps/desktop_alt/Controller.js
@@ -17,6 +17,8 @@ import ngeoRoutingModule from 'ngeo/routing/module.js';
import ngeoProjEPSG2056 from 'ngeo/proj/EPSG2056.js';
import ngeoProjEPSG21781 from 'ngeo/proj/EPSG21781.js';
import * as olBase from 'ol/index.js';
+import Raven from 'raven-js/src/raven.js';
+import RavenPluginsAngular from 'raven-js/plugins/angular.js';
if (!window.requestAnimationFrame) {
alert('Your browser is not supported, please update it or use another one. You will be redirected.\n\n'
@@ -127,6 +129,14 @@ const exports = function($scope, $injector, ngeoFile, gettext, $q) {
* @export
*/
this.bgOpacityOptions = 'Test aus Olten';
+
+ if ($injector.has('sentryUrl')) {
+ const options = $injector.has('sentryOptions') ? $injector.get('sentryOptions') : undefined;
+ const raven = new Raven();
+ raven.config($injector.get('sentryUrl'), options)
+ .addPlugin(RavenPluginsAngular)
+ .install();
+ }
};
olBase.inherits(exports, gmfControllersAbstractDesktopController);
diff --git a/contribs/gmf/apps/mobile/Controller.js b/contribs/gmf/apps/mobile/Controller.js
index 1de8986c665..f5a88f356f0 100644
--- a/contribs/gmf/apps/mobile/Controller.js
+++ b/contribs/gmf/apps/mobile/Controller.js
@@ -14,6 +14,8 @@ import appBase from '../appmodule.js';
import ngeoProjEPSG2056 from 'ngeo/proj/EPSG2056.js';
import ngeoProjEPSG21781 from 'ngeo/proj/EPSG21781.js';
import * as olBase from 'ol/index.js';
+import Raven from 'raven-js/src/raven.js';
+import RavenPluginsAngular from 'raven-js/plugins/angular.js';
if (!window.requestAnimationFrame) {
alert('Your browser is not supported, please update it or use another one. You will be redirected.\n\n'
@@ -56,6 +58,13 @@ const exports = function($scope, $injector) {
*/
this.searchCoordinatesProjections = [ngeoProjEPSG21781, ngeoProjEPSG2056, 'EPSG:4326'];
+ if ($injector.has('sentryUrl')) {
+ const options = $injector.has('sentryOptions') ? $injector.get('sentryOptions') : undefined;
+ const raven = new Raven();
+ raven.config($injector.get('sentryUrl'), options)
+ .addPlugin(RavenPluginsAngular)
+ .install();
+ }
};
olBase.inherits(exports, gmfControllersAbstractMobileController);
diff --git a/contribs/gmf/apps/mobile_alt/Controller.js b/contribs/gmf/apps/mobile_alt/Controller.js
index bc8e27d567e..09069360277 100644
--- a/contribs/gmf/apps/mobile_alt/Controller.js
+++ b/contribs/gmf/apps/mobile_alt/Controller.js
@@ -18,6 +18,8 @@ import olStyleFill from 'ol/style/Fill.js';
import olStyleRegularShape from 'ol/style/RegularShape.js';
import olStyleStroke from 'ol/style/Stroke.js';
import olStyleStyle from 'ol/style/Style.js';
+import Raven from 'raven-js/src/raven.js';
+import RavenPluginsAngular from 'raven-js/plugins/angular.js';
if (!window.requestAnimationFrame) {
alert('Your browser is not supported, please update it or use another one. You will be redirected.\n\n'
@@ -93,6 +95,13 @@ const exports = function($scope, $injector) {
})
});
+ if ($injector.has('sentryUrl')) {
+ const options = $injector.has('sentryOptions') ? $injector.get('sentryOptions') : undefined;
+ const raven = new Raven();
+ raven.config($injector.get('sentryUrl'), options)
+ .addPlugin(RavenPluginsAngular)
+ .install();
+ }
};
olBase.inherits(exports, gmfControllersAbstractMobileController);
diff --git a/contribs/gmf/apps/oeedit/Controller.js b/contribs/gmf/apps/oeedit/Controller.js
index 0be987890ef..fa1cbcceea3 100644
--- a/contribs/gmf/apps/oeedit/Controller.js
+++ b/contribs/gmf/apps/oeedit/Controller.js
@@ -19,6 +19,8 @@ import * as olBase from 'ol/index.js';
import olCollection from 'ol/Collection.js';
import olLayerVector from 'ol/layer/Vector.js';
import olSourceVector from 'ol/source/Vector.js';
+import Raven from 'raven-js/src/raven.js';
+import RavenPluginsAngular from 'raven-js/plugins/angular.js';
if (!window.requestAnimationFrame) {
alert('Your browser is not supported, please update it or use another one. You will be redirected.\n\n'
@@ -206,6 +208,14 @@ const exports = function($scope, $injector, $timeout) {
gettextCatalog.getString('Add a theme');
gettextCatalog.getString('Add a sub theme');
gettextCatalog.getString('Add a layer');
+
+ if ($injector.has('sentryUrl')) {
+ const options = $injector.has('sentryOptions') ? $injector.get('sentryOptions') : undefined;
+ const raven = new Raven();
+ raven.config($injector.get('sentryUrl'), options)
+ .addPlugin(RavenPluginsAngular)
+ .install();
+ }
};
olBase.inherits(exports, gmfControllersAbstractDesktopController);
diff --git a/contribs/gmf/apps/oeview/Controller.js b/contribs/gmf/apps/oeview/Controller.js
index bf4c18a6161..b0697747bc0 100644
--- a/contribs/gmf/apps/oeview/Controller.js
+++ b/contribs/gmf/apps/oeview/Controller.js
@@ -14,6 +14,8 @@ import appBase from '../appmodule.js';
import ngeoProjEPSG2056 from 'ngeo/proj/EPSG2056.js';
import ngeoProjEPSG21781 from 'ngeo/proj/EPSG21781.js';
import * as olBase from 'ol/index.js';
+import Raven from 'raven-js/src/raven.js';
+import RavenPluginsAngular from 'raven-js/plugins/angular.js';
if (!window.requestAnimationFrame) {
alert('Your browser is not supported, please update it or use another one. You will be redirected.\n\n'
@@ -97,6 +99,14 @@ const exports = function($scope, $injector) {
gettextCatalog.getString('Add a theme');
gettextCatalog.getString('Add a sub theme');
gettextCatalog.getString('Add a layer');
+
+ if ($injector.has('sentryUrl')) {
+ const options = $injector.has('sentryOptions') ? $injector.get('sentryOptions') : undefined;
+ const raven = new Raven();
+ raven.config($injector.get('sentryUrl'), options)
+ .addPlugin(RavenPluginsAngular)
+ .install();
+ }
};
olBase.inherits(exports, gmfControllersAbstractDesktopController);
diff --git a/contribs/gmf/cursors/Grab_hand_animation_2sec.gif b/contribs/gmf/cursors/Grab_hand_animation_2sec.gif
deleted file mode 100644
index 17002971bce..00000000000
Binary files a/contribs/gmf/cursors/Grab_hand_animation_2sec.gif and /dev/null differ
diff --git a/contribs/gmf/cursors/grab.cur b/contribs/gmf/cursors/grab.cur
new file mode 100644
index 00000000000..c72cd91a05f
Binary files /dev/null and b/contribs/gmf/cursors/grab.cur differ
diff --git a/contribs/gmf/cursors/grab.png b/contribs/gmf/cursors/grab.png
deleted file mode 100644
index 2555f931f74..00000000000
Binary files a/contribs/gmf/cursors/grab.png and /dev/null differ
diff --git a/contribs/gmf/cursors/grabbing.cur b/contribs/gmf/cursors/grabbing.cur
new file mode 100644
index 00000000000..123dc2d3400
Binary files /dev/null and b/contribs/gmf/cursors/grabbing.cur differ
diff --git a/contribs/gmf/cursors/grabbing.png b/contribs/gmf/cursors/grabbing.png
deleted file mode 100644
index a2843dd716d..00000000000
Binary files a/contribs/gmf/cursors/grabbing.png and /dev/null differ
diff --git a/contribs/gmf/examples/datepicker.html b/contribs/gmf/examples/datepicker.html
index b09000735ea..c9d9f748f51 100644
--- a/contribs/gmf/examples/datepicker.html
+++ b/contribs/gmf/examples/datepicker.html
@@ -14,7 +14,7 @@
{{ctrl.rangeValue}}@@ -23,7 +23,7 @@
{{ctrl.value}}diff --git a/contribs/gmf/examples/profile.html b/contribs/gmf/examples/profile.html index 7b41197a334..92ed1cfcf30 100644 --- a/contribs/gmf/examples/profile.html +++ b/contribs/gmf/examples/profile.html @@ -13,7 +13,7 @@
This example shows how to use the gmf-profile
.
- The draw tool and hover feedback on the map are completely independant of
+ The draw tool and hover feedback on the map are completely independent of
the gmf-profile components. This profile relies on the ngeo.profile (d3) and
ngeo.ProfileDirective. It passes a custom css through the optional
gmf-profile-options attribute
{{ctrl.sliderRangeValue}}@@ -29,7 +29,7 @@
{{ctrl.sliderValue}}diff --git a/contribs/gmf/externs/gmf-themes.js b/contribs/gmf/externs/gmf-themes.js index 73c14d792c9..45248b1259f 100644 --- a/contribs/gmf/externs/gmf-themes.js +++ b/contribs/gmf/externs/gmf-themes.js @@ -146,7 +146,7 @@ gmfThemes.GmfGroup.prototype.ogcServer; /** - * On non mixed first level group with more then one time layer, it is the time informations. + * On non mixed first level group with more then one time layer, it is the time information. * @type {ngeox.TimeProperty|undefined} */ gmfThemes.GmfGroup.prototype.time; @@ -232,7 +232,7 @@ gmfThemes.GmfLayerWMS.prototype.ogcServer; /** - * The time informations if the layer directly manage it, see + * The time information if the layer directly manage it, see * also {gmfThemes.GmfGroup.time}. * @type {ngeox.TimeProperty|undefined} */ @@ -378,7 +378,7 @@ gmfThemes.GmfFunctionalities.prototype.default_basemap; /** * When set, contains the name of the panel to open upon loading an application. - * Note: altough this is a list, only one can be defined. + * Note: although this is a list, only one can be defined. * @type {Array.|undefined} */ gmfThemes.GmfFunctionalities.prototype.open_panel; @@ -387,7 +387,7 @@ gmfThemes.GmfFunctionalities.prototype.open_panel; /** * Name of the layer (data source) that should be toggled in the filter tool * upon loading an application. - * Note: altough this is a list, only one can be defined. + * Note: although this is a list, only one can be defined. * @type {Array.|undefined} */ gmfThemes.GmfFunctionalities.prototype.preset_layer_filter; @@ -561,7 +561,7 @@ gmfThemes.GmfMetaData.prototype.maxResolution; /** - * The URL to the informations on this layer. + * The URL to the information on this layer. * For WMS and WMTS layers. * @type {string|undefined} */ diff --git a/contribs/gmf/options/gmfx.js b/contribs/gmf/options/gmfx.js index db6a39c941c..5368dc58967 100644 --- a/contribs/gmf/options/gmfx.js +++ b/contribs/gmf/options/gmfx.js @@ -178,7 +178,7 @@ gmfx.MousePositionProjection.prototype.code; /** - * The label to diplay with this projection. + * The label to display with this projection. * @type {string} */ gmfx.MousePositionProjection.prototype.label; @@ -753,7 +753,7 @@ gmfx.datasource.OGCOptions; /** * A reference to the GMF layer node that was used to create the data source. - * It may contains additionnal information, such as metadata, about the data + * It may contains additional information, such as metadata, about the data * source. * @type {gmfThemes.GmfLayer} */ diff --git a/contribs/gmf/src/contextualdata/component.js b/contribs/gmf/src/contextualdata/component.js index b2cc6a289dc..eee802a13f0 100644 --- a/contribs/gmf/src/contextualdata/component.js +++ b/contribs/gmf/src/contextualdata/component.js @@ -80,6 +80,7 @@ exports.directive('gmfContextualdata', /** * * @param {angular.$compile} $compile Angular compile service. + * @param {angular.$timeout} $timeout Angular timeout service. * @param {!angular.Scope} $scope Scope. * @param {gmf.raster.RasterService} gmfRaster Gmf Raster service * @@ -88,7 +89,7 @@ exports.directive('gmfContextualdata', * @ngdoc controller * @ngInject */ -exports.Controller_ = function($compile, $scope, gmfRaster) { +exports.Controller_ = function($compile, $timeout, $scope, gmfRaster) { /** * @type {ol.Map} @@ -120,6 +121,12 @@ exports.Controller_ = function($compile, $scope, gmfRaster) { */ this.$compile_ = $compile; + /** + * @type {angular.$timeout} + * @private + */ + this.timeout_ = $timeout; + /** * @type {angular.Scope} * @private @@ -160,7 +167,11 @@ exports.Controller_.prototype.handleMapContextMenu_ = function(event) { event.preventDefault(); this.hidePopover(); this.showPopover(); - this.overlay_.setPosition(coordinate); + + // Use timeout to let the popover content to be rendered before displaying it. + this.timeout_(() => { + this.overlay_.setPosition(coordinate); + }); }); }; diff --git a/contribs/gmf/src/controllers/mobile-theme.less b/contribs/gmf/src/controllers/mobile-theme.less new file mode 100644 index 00000000000..e69de29bb2d diff --git a/contribs/gmf/src/filters/filterselectorComponent.js b/contribs/gmf/src/filters/filterselectorComponent.js index fa79ce57b89..a68c7cab817 100644 --- a/contribs/gmf/src/filters/filterselectorComponent.js +++ b/contribs/gmf/src/filters/filterselectorComponent.js @@ -354,7 +354,7 @@ exports.Controller_ = class { /** * Called when the active property changes. Toggle data source registration. - * Also, when deactivated, unselect data source. + * Also, when deactivated, deselect data source. * @param {boolean} active Active. * @private */ @@ -454,7 +454,7 @@ exports.Controller_ = class { /** * Unregister a data source if it's filtrable. Also, if it's the one - * that was currently selected, unselect it. + * that was currently selected, deselect it. * @param {gmf.datasource.OGC} dataSource Data source * @private */ diff --git a/contribs/gmf/src/layertree/TreeManager.js b/contribs/gmf/src/layertree/TreeManager.js index c78ef1c7d5e..7f95422ff4a 100644 --- a/contribs/gmf/src/layertree/TreeManager.js +++ b/contribs/gmf/src/layertree/TreeManager.js @@ -88,7 +88,7 @@ const exports = function($timeout, $injector, gettextCatalog, ngeoLayerHelper, /** * The controller of the (unique) root layer tree. - * The array of top level layer trees is avaible through `rootCtrl.children`. + * The array of top level layer trees is available through `rootCtrl.children`. * The order doesn't match with the ordre of the displayed layertree. * @type {ngeo.layertree.Controller} * @export @@ -576,7 +576,7 @@ exports.prototype.setNodeMetadataFromFullState_ = function(node, fullState) { }); } - // Set the metadata with the fullState object informations. + // Set the metadata with the fullState object information. const metadata = node.metadata; metadata.isChecked = fullState.isChecked; metadata.isExpanded = fullState.isExpanded; diff --git a/contribs/gmf/src/layertree/component.js b/contribs/gmf/src/layertree/component.js index 759c12d7f13..8ff442a3062 100644 --- a/contribs/gmf/src/layertree/component.js +++ b/contribs/gmf/src/layertree/component.js @@ -98,7 +98,7 @@ function gmfLayertreeTemplate($element, $attrs, gmfLayertreeTemplate) { * This component creates a layertree based on the c2cgeoportal JSON themes * source and a {@link ngeo.layertreeComponent}. The controller used by this * component defines some functions for each node that are created by a default - * template. This default template can be overrided by setting the value + * template. This default template can be overridden by setting the value * 'gmf.layertreeTemplateUrl' but you will have to adapt the * ngeoLayertreeTemplateUrl value too (to define the children's nodes template * path). @@ -532,7 +532,7 @@ exports.Controller_.prototype.getLegendsObject = function(treeCtrl) { let layersNames = gmfLayerWMS.layers; const gmfOgcServer = this.gmfTreeManager_.getOgcServer(treeCtrl); const scale = this.getScale_(); - // QGIS can handle multiple layers natively. Use Mutliple urls for other map + // QGIS can handle multiple layers natively. Use Multiple URLs for other map // servers if (gmfOgcServer.type === ngeoDatasourceOGC.ServerType.QGISSERVER) { layersNames = [layersNames]; diff --git a/contribs/gmf/src/less/vars.less b/contribs/gmf/src/less/vars.less index f1d0bc006a9..ec30fcd16ae 100644 --- a/contribs/gmf/src/less/vars.less +++ b/contribs/gmf/src/less/vars.less @@ -1,5 +1,7 @@ @import "~bootstrap/less/variables.less"; +@search-width: 6 * @map-tools-size; + @app-margin: 1rem; @half-app-margin: 0.5rem; @micro-app-margin: 0.2rem; @@ -36,4 +38,4 @@ @brand-secondary: #d3e5d7; @font-size-small: 0.9em; -@import (optional) "@{THEME}"; +@import "@{THEME}"; diff --git a/contribs/gmf/src/lidarprofile/Manager.js b/contribs/gmf/src/lidarprofile/Manager.js index 5ad0bcf1d0f..43deb5dd4d0 100644 --- a/contribs/gmf/src/lidarprofile/Manager.js +++ b/contribs/gmf/src/lidarprofile/Manager.js @@ -83,7 +83,7 @@ const exports = class { this.map_ = null; /** - * The hovered point attributes in d3 profile highlighted on the 2D map + * The hovered point attributes in D3 profile highlighted on the 2D map * @type {ol.Overlay} */ this.cartoHighlight = new olOverlay({ @@ -92,7 +92,7 @@ const exports = class { }); /** - * The hovered point geometry (point) in d3 profile highlighted on the 2D map + * The hovered point geometry (point) in D3 profile highlighted on the 2D map * @type {ol.layer.Vector} */ this.lidarPointHighlight = new olLayerVector({ @@ -201,11 +201,11 @@ const exports = class { /** - * Load profile data (lidar points) by succesive Levels Of Details using asynchronous requests + * Load profile data (lidar points) by successive Levels Of Details using asynchronous requests * @param {Array} clippedLine an array of the clipped line coordinates - * @param {number} distanceOffset the left side of d3 profile domain at current zoom and pan configuration - * @param {boolean} resetPlot wether to reset d3 plot or not - * @param {number} minLOD minimum level of detail + * @param {number} distanceOffset the left side of D3 profile domain at current zoom and pan configuration + * @param {boolean} resetPlot whether to reset D3 plot or not + * @param {number} minLOD minimum Level Of Detail * @export */ getProfileByLOD(clippedLine, distanceOffset, resetPlot, minLOD) { @@ -265,14 +265,14 @@ const exports = class { /** * Request to Pytree service for a range of Level Of Detail (LOD) - * @param {number} minLOD minimum level of detail of the request - * @param {number} maxLOD maximum level of detail of the request + * @param {number} minLOD minimum Level Of Detail of the request + * @param {number} maxLOD maximum Level Of Detail of the request * @param {number} iter the iteration in profile requests cycle * @param {string} coordinates linestring in cPotree format - * @param {number} distanceOffset the left side of d3 profile domain at current zoom and pan configuration + * @param {number} distanceOffset the left side of D3 profile domain at current zoom and pan configuration * @param {boolean} lastLOD the deepest level to retrieve for this profile * @param {number} width the width of the profile - * @param {boolean} resetPlot wether to reset d3 plot or not, used for first LOD + * @param {boolean} resetPlot whether to reset D3 plot or not, used for first LOD * @private */ queryPytree_(minLOD, maxLOD, iter, coordinates, distanceOffset, lastLOD, width, resetPlot) { @@ -312,9 +312,9 @@ const exports = class { * Process the binary array return by Pytree (cPotree) * @param {ArrayBuffer} profile binary array returned by cPotree executable called by Pytree * @param {number} iter the iteration in profile requests cycle - * @param {number} distanceOffset the left side of d3 profile domain at current zoom and pan configuration + * @param {number} distanceOffset the left side of D3 profile domain at current zoom and pan configuration * @param {boolean} lastLOD the deepest level to retrieve for this profile - * @param {boolean} resetPlot wether to reset d3 plot or not + * @param {boolean} resetPlot whether to reset D3 plot or not * @private */ processBuffer_(profile, iter, distanceOffset, lastLOD, resetPlot) { @@ -449,7 +449,7 @@ const exports = class { } /** - * Update the profile data according to d3 chart zoom and pan level + * Update the profile data according to D3 chart zoom and pan level * The update will wait on a 200ms pause on the actions of users before to do the update. * @export */ diff --git a/contribs/gmf/src/lidarprofile/Plot.js b/contribs/gmf/src/lidarprofile/Plot.js index 0fc671052c8..4e25f80404d 100644 --- a/contribs/gmf/src/lidarprofile/Plot.js +++ b/contribs/gmf/src/lidarprofile/Plot.js @@ -24,7 +24,7 @@ const exports = class { /** * Provides a service to create an SVG element with defined axis and a LIDAR - * point drawing mecanism. + * point drawing mechanism. * * @struct * @param {gmf.lidarprofile.Manager} gmfLidarprofileManagerInstance gmf lidar profile manager instance @@ -137,7 +137,7 @@ const exports = class { /** - * Setup the SVG components of the d3 chart + * Setup the SVG components of the D3 chart * @param {Array.