Skip to content

Commit

Permalink
Merge pull request #3303 from camptocamp/move_services_to_misc_module
Browse files Browse the repository at this point in the history
Move some services to misc module (second pack)
  • Loading branch information
ger-benjamin authored Dec 21, 2017
2 parents 3f5e770 + b1b693e commit bf5edc5
Show file tree
Hide file tree
Showing 42 changed files with 343 additions and 514 deletions.
10 changes: 5 additions & 5 deletions contribs/gmf/apps/oeedit/js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ goog.require('ngeo.proj.EPSG21781');
goog.require('gmf.objecteditingComponent');
goog.require('gmf.ObjectEditingManager');
goog.require('gmf.Themes');
goog.require('ngeo.ToolActivate');
goog.require('ngeo.misc.ToolActivate');
/** @suppress {extraRequire} */
goog.require('ngeo.ToolActivateMgr');
goog.require('ngeo.misc.ToolActivateMgr');
goog.require('ol');
goog.require('ol.Collection');
goog.require('ol.layer.Vector');
Expand Down Expand Up @@ -53,16 +53,16 @@ app.oeedit.Controller = function($scope, $injector, $timeout) {

/**
* The ngeo ToolActivate manager service.
* @type {ngeo.ToolActivateMgr}
* @type {ngeo.misc.ToolActivateMgr}
*/
const ngeoToolActivateMgr = $injector.get('ngeoToolActivateMgr');

ngeoToolActivateMgr.unregisterGroup('mapTools');

const oeEditToolActivate = new ngeo.ToolActivate(this, 'oeEditActive');
const oeEditToolActivate = new ngeo.misc.ToolActivate(this, 'oeEditActive');
ngeoToolActivateMgr.registerTool('mapTools', oeEditToolActivate, true);

const queryToolActivate = new ngeo.ToolActivate(this, 'queryActive');
const queryToolActivate = new ngeo.misc.ToolActivate(this, 'queryActive');
ngeoToolActivateMgr.registerTool('mapTools', queryToolActivate, false);

// Set edit tool as default active one
Expand Down
12 changes: 6 additions & 6 deletions contribs/gmf/examples/drawfeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ goog.require('gmf.mapDirective');
goog.require('ngeo.draw.module');
goog.require('ngeo.map.module');
goog.require('ngeo.misc.FeatureHelper');
goog.require('ngeo.ToolActivate');
goog.require('ngeo.ToolActivateMgr');
goog.require('ngeo.misc.ToolActivate');
goog.require('ngeo.misc.ToolActivateMgr');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
Expand All @@ -20,7 +20,7 @@ gmfapp.module = angular.module('gmfapp', [
ngeo.draw.module.name,
ngeo.map.module.name, // for ngeo.map.FeatureOverlay, perhaps remove me
ngeo.misc.FeatureHelper.module.name,
ngeo.ToolActivateMgr.module.name,
ngeo.misc.ToolActivateMgr.module.name,
]);


Expand All @@ -34,7 +34,7 @@ gmfapp.module.value('ngeoExportFeatureFormats', [
* @param {!angular.Scope} $scope Angular scope.
* @param {ngeo.misc.FeatureHelper} ngeoFeatureHelper Gmf feature helper service.
* @param {ol.Collection.<ol.Feature>} ngeoFeatures Collection of features.
* @param {ngeo.ToolActivateMgr} ngeoToolActivateMgr Ngeo ToolActivate manager
* @param {ngeo.misc.ToolActivateMgr} ngeoToolActivateMgr Ngeo ToolActivate manager
* service.
* @param {ngeo.map.FeatureOverlayMgr} ngeoFeatureOverlayMgr Ngeo FeatureOverlay
* manager
Expand Down Expand Up @@ -79,7 +79,7 @@ gmfapp.MainController = function($scope, ngeoFeatureHelper, ngeoFeatures,
*/
this.drawFeatureActive = true;

const drawFeatureToolActivate = new ngeo.ToolActivate(
const drawFeatureToolActivate = new ngeo.misc.ToolActivate(
this, 'drawFeatureActive');
ngeoToolActivateMgr.registerTool(
'mapTools', drawFeatureToolActivate, true);
Expand All @@ -90,7 +90,7 @@ gmfapp.MainController = function($scope, ngeoFeatureHelper, ngeoFeatures,
*/
this.pointerMoveActive = false;

const pointerMoveToolActivate = new ngeo.ToolActivate(
const pointerMoveToolActivate = new ngeo.misc.ToolActivate(
this, 'pointerMoveActive');
ngeoToolActivateMgr.registerTool(
'mapTools', pointerMoveToolActivate, false);
Expand Down
15 changes: 8 additions & 7 deletions contribs/gmf/examples/editfeatureselector.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
goog.provide('gmfapp.editfeatureselector');

goog.require('gmf');
goog.require('gmf.Themes');
goog.require('gmf.TreeManager');
/** @suppress {extraRequire} */
Expand All @@ -11,8 +12,8 @@ goog.require('gmf.layertreeComponent');
/** @suppress {extraRequire} */
goog.require('gmf.mapDirective');
goog.require('ngeo.misc.FeatureHelper');
goog.require('ngeo.ToolActivate');
goog.require('ngeo.ToolActivateMgr');
goog.require('ngeo.misc.ToolActivate');
goog.require('ngeo.misc.ToolActivateMgr');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');
goog.require('ol.Collection');
Expand All @@ -26,8 +27,8 @@ goog.require('ol.source.Vector');

/** @type {!angular.Module} **/
gmfapp.module = angular.module('gmfapp', [
'gmf',
ngeo.ToolActivateMgr.module.name,
gmf.module.name,
ngeo.misc.ToolActivateMgr.module.name,
gmf.authentication.module.name,
]);

Expand Down Expand Up @@ -55,7 +56,7 @@ gmfapp.module.value('gmfLayersUrl',
* @param {gmf.TreeManager} gmfTreeManager gmf Tree Manager service.
* @param {gmfx.User} gmfUser User.
* @param {ngeo.misc.FeatureHelper} ngeoFeatureHelper Ngeo feature helper service.
* @param {ngeo.ToolActivateMgr} ngeoToolActivateMgr Ngeo ToolActivate manager
* @param {ngeo.misc.ToolActivateMgr} ngeoToolActivateMgr Ngeo ToolActivate manager
* service.
* @ngInject
* @constructor
Expand Down Expand Up @@ -141,7 +142,7 @@ gmfapp.MainController = function($scope, gmfThemes, gmfTreeManager, gmfUser,
*/
this.editFeatureSelectorActive = true;

const editFeatureSelectorToolActivate = new ngeo.ToolActivate(
const editFeatureSelectorToolActivate = new ngeo.misc.ToolActivate(
this, 'editFeatureSelectorActive');
ngeoToolActivateMgr.registerTool(
'mapTools', editFeatureSelectorToolActivate, true);
Expand All @@ -152,7 +153,7 @@ gmfapp.MainController = function($scope, gmfThemes, gmfTreeManager, gmfUser,
*/
this.dummyActive = false;

const dummyToolActivate = new ngeo.ToolActivate(
const dummyToolActivate = new ngeo.misc.ToolActivate(
this, 'dummyActive');
ngeoToolActivateMgr.registerTool(
'mapTools', dummyToolActivate, false);
Expand Down
17 changes: 9 additions & 8 deletions contribs/gmf/examples/filterselector.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

goog.provide('gmfapp.filterselector');

goog.require('gmf');
/** @suppress {extraRequire} */
goog.require('gmf.authentication.module');
goog.require('gmf.Themes');
Expand All @@ -18,8 +19,8 @@ goog.require('gmf.mapDirective');
goog.require('ngeo.query.bboxQueryComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.query.mapQueryComponent');
goog.require('ngeo.ToolActivate');
goog.require('ngeo.ToolActivateMgr');
goog.require('ngeo.misc.ToolActivate');
goog.require('ngeo.misc.ToolActivateMgr');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');
goog.require('ol.Map');
Expand All @@ -30,8 +31,8 @@ goog.require('ol.source.OSM');

/** @type {!angular.Module} **/
gmfapp.module = angular.module('gmfapp', [
'gmf',
ngeo.ToolActivateMgr.module.name,
gmf.module.name,
ngeo.misc.ToolActivateMgr.module.name,
gmf.authentication.module.name,
]);

Expand Down Expand Up @@ -63,7 +64,7 @@ gmfapp.MainController = class {
* @param {gmf.TreeManager} gmfTreeManager gmf Tree Manager service.
* @param {ngeo.datasource.DataSources} ngeoDataSources Ngeo collection of
* data sources objects.
* @param {ngeo.ToolActivateMgr} ngeoToolActivateMgr Ngeo ToolActivate manager
* @param {ngeo.misc.ToolActivateMgr} ngeoToolActivateMgr Ngeo ToolActivate manager
* service.
* @ngInject
*/
Expand Down Expand Up @@ -127,7 +128,7 @@ gmfapp.MainController = class {
*/
this.filterSelectorActive = true;

const filterSelectorToolActivate = new ngeo.ToolActivate(
const filterSelectorToolActivate = new ngeo.misc.ToolActivate(
this, 'filterSelectorActive');
ngeoToolActivateMgr.registerTool(
'dummyTools', filterSelectorToolActivate, true);
Expand All @@ -138,7 +139,7 @@ gmfapp.MainController = class {
*/
this.dummyActive = false;

const dummyToolActivate = new ngeo.ToolActivate(
const dummyToolActivate = new ngeo.misc.ToolActivate(
this, 'dummyActive');
ngeoToolActivateMgr.registerTool(
'dummyTools', dummyToolActivate, false);
Expand All @@ -149,7 +150,7 @@ gmfapp.MainController = class {
*/
this.queryActive = true;

const queryToolActivate = new ngeo.ToolActivate(
const queryToolActivate = new ngeo.misc.ToolActivate(
this, 'queryActive');
ngeoToolActivateMgr.registerTool(
this.toolGroup, queryToolActivate, true);
Expand Down
15 changes: 8 additions & 7 deletions contribs/gmf/examples/objectediting.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
goog.provide('gmfapp.objectediting');

goog.require('gmf');
goog.require('gmf.Themes');
goog.require('gmf.TreeManager');
/** @suppress {extraRequire} */
Expand All @@ -9,8 +10,8 @@ goog.require('gmf.mapDirective');
/** @suppress {extraRequire} */
goog.require('gmf.objecteditingComponent');
goog.require('gmf.ObjectEditingManager');
goog.require('ngeo.ToolActivate');
goog.require('ngeo.ToolActivateMgr');
goog.require('ngeo.misc.ToolActivate');
goog.require('ngeo.misc.ToolActivateMgr');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');
goog.require('ol.Collection');
Expand All @@ -24,8 +25,8 @@ goog.require('ol.source.Vector');

/** @type {!angular.Module} **/
gmfapp.module = angular.module('gmfapp', [
'gmf',
ngeo.ToolActivateMgr.module.name,
gmf.module.name,
ngeo.misc.ToolActivateMgr.module.name,
]);


Expand All @@ -34,7 +35,7 @@ gmfapp.module = angular.module('gmfapp', [
* ObjectEditing manager service.
* @param {gmf.Themes} gmfThemes The gmf themes service.
* @param {gmf.TreeManager} gmfTreeManager gmf Tree Manager service.
* @param {ngeo.ToolActivateMgr} ngeoToolActivateMgr Ngeo ToolActivate manager
* @param {ngeo.misc.ToolActivateMgr} ngeoToolActivateMgr Ngeo ToolActivate manager
* service.
* @constructor
* @ngInject
Expand Down Expand Up @@ -130,7 +131,7 @@ gmfapp.MainController = function(gmfObjectEditingManager, gmfThemes,
*/
this.objectEditingActive = true;

const objectEditingToolActivate = new ngeo.ToolActivate(
const objectEditingToolActivate = new ngeo.misc.ToolActivate(
this, 'objectEditingActive');
ngeoToolActivateMgr.registerTool(
'mapTools', objectEditingToolActivate, true);
Expand All @@ -141,7 +142,7 @@ gmfapp.MainController = function(gmfObjectEditingManager, gmfThemes,
*/
this.dummyActive = false;

const dummyToolActivate = new ngeo.ToolActivate(
const dummyToolActivate = new ngeo.misc.ToolActivate(
this, 'dummyActive');
ngeoToolActivateMgr.registerTool(
'mapTools', dummyToolActivate, false);
Expand Down
23 changes: 12 additions & 11 deletions contribs/gmf/src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ goog.require('ngeo.query.MapQuerent');
goog.require('ngeo.query.mapQueryComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.misc.FeatureHelper');
goog.require('ngeo.GetBrowserLanguage');
goog.require('ngeo.ToolActivate');
/** @suppress {extraRequire} */
goog.require('ngeo.ToolActivateMgr');
goog.require('ngeo.misc.getBrowserLanguage');
goog.require('ngeo.misc.ToolActivate');
/** @suppress {extraRequire} */
goog.require('ngeo.misc.ToolActivateMgr');
goog.require('ol.events');
goog.require('ol.style.Circle');
goog.require('ol.style.Fill');
Expand Down Expand Up @@ -338,7 +339,7 @@ gmf.AbstractAppController = function(config, $scope, $injector) {
});

/**
* @type {ngeo.GetBrowserLanguage}
* @type {ngeox.miscGetBrowserLanguage}
*/
this.getBrowserLanguage = $injector.get('ngeoGetBrowserLanguage');

Expand Down Expand Up @@ -400,26 +401,26 @@ gmf.AbstractAppController = function(config, $scope, $injector) {

/**
* The ngeo ToolActivate manager service.
* @type {ngeo.ToolActivateMgr}
* @type {ngeo.misc.ToolActivateMgr}
*/
const ngeoToolActivateMgr = $injector.get('ngeoToolActivateMgr');

const queryToolActivate = new ngeo.ToolActivate(this, 'queryActive');
const queryToolActivate = new ngeo.misc.ToolActivate(this, 'queryActive');
ngeoToolActivateMgr.registerTool(mapTools, queryToolActivate, true);

const measurePointActivate = new ngeo.ToolActivate(this, 'measurePointActive');
const measurePointActivate = new ngeo.misc.ToolActivate(this, 'measurePointActive');
ngeoToolActivateMgr.registerTool(mapTools, measurePointActivate, false);

const measureLengthActivate = new ngeo.ToolActivate(this, 'measureLengthActive');
const measureLengthActivate = new ngeo.misc.ToolActivate(this, 'measureLengthActive');
ngeoToolActivateMgr.registerTool(mapTools, measureLengthActivate, false);

const drawFeatureActivate = new ngeo.ToolActivate(this, 'drawFeatureActive');
const drawFeatureActivate = new ngeo.misc.ToolActivate(this, 'drawFeatureActive');
ngeoToolActivateMgr.registerTool(mapTools, drawFeatureActivate, false);

const drawProfilePanelActivate = new ngeo.ToolActivate(this, 'drawProfilePanelActive');
const drawProfilePanelActivate = new ngeo.misc.ToolActivate(this, 'drawProfilePanelActive');
ngeoToolActivateMgr.registerTool(mapTools, drawProfilePanelActivate, false);

const printPanelActivate = new ngeo.ToolActivate(this, 'printPanelActive');
const printPanelActivate = new ngeo.misc.ToolActivate(this, 'printPanelActive');
ngeoToolActivateMgr.registerTool(mapTools, printPanelActivate, false);

$scope.$root.$on(gmf.ThemeManager.EventType.THEME_NAME_SET, (event, name) => {
Expand Down
10 changes: 6 additions & 4 deletions contribs/gmf/src/controllers/AbstractDesktopController.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ goog.require('ngeo.btnDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.draw.features');
/** @suppress {extraRequire} */
goog.require('ngeo.ToolActivate');
goog.require('ngeo.misc.ToolActivate');
/** @suppress {extraRequire} */
goog.require('ngeo.misc.ToolActivateMgr');
goog.require('ol.Collection');
goog.require('ol.Map');
goog.require('ol.View');
Expand Down Expand Up @@ -212,14 +214,14 @@ gmf.AbstractDesktopController = function(config, $scope, $injector) {

/**
* The ngeo ToolActivate manager service.
* @type {ngeo.ToolActivateMgr}
* @type {ngeo.misc.ToolActivateMgr}
*/
const ngeoToolActivateMgr = $injector.get('ngeoToolActivateMgr');

const editFeatureActivate = new ngeo.ToolActivate(this, 'editFeatureActive');
const editFeatureActivate = new ngeo.misc.ToolActivate(this, 'editFeatureActive');
ngeoToolActivateMgr.registerTool('mapTools', editFeatureActivate, false);

const googleStreetViewActivate = new ngeo.ToolActivate(
const googleStreetViewActivate = new ngeo.misc.ToolActivate(
this,
'googleStreetViewActive'
);
Expand Down
Loading

0 comments on commit bf5edc5

Please sign in to comment.