Skip to content

Commit 2d8fd25

Browse files
committed
Convert the files using babel-plugin-angularjs-annotate
1 parent 083c560 commit 2d8fd25

File tree

208 files changed

+2039
-3309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+2039
-3309
lines changed

contribs/gmf/apps/appmodule.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import AngularServices from 'ngeo/services';
3434
* @hidden
3535
*/
3636
const appModule = angular.module('app', []);
37-
3837
appModule.config([
3938
'$compileProvider',
4039
/**
@@ -51,9 +50,11 @@ appModule.config([
5150
/**
5251
* @ngInject
5352
*/
54-
appModule.run(($injector) => {
55-
//AngularServices.auth = $injector.get('gmfAuthenticationService');
56-
//AngularServices.notification = $injector.get('ngeoNotification');
57-
});
58-
53+
appModule.run([
54+
'$injector',
55+
($injector) => {
56+
//AngularServices.auth = $injector.get('gmfAuthenticationService');
57+
//AngularServices.notification = $injector.get('ngeoNotification');
58+
},
59+
]);
5960
export default appModule;

contribs/gmf/apps/desktop/Controller.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
import './sass/desktop.scss';
3030
import './sass/vars_desktop.scss';
31-
3231
import angular from 'angular';
3332
import {isEventUsingCtrlKey} from 'ngeo/utils';
3433
import gmfControllersAbstractDesktopController, {
@@ -55,19 +54,19 @@ class Controller extends AbstractDesktopController {
5554
* @hidden
5655
*/
5756
const appModule = angular.module('Appdesktop', [appBase.name, gmfControllersAbstractDesktopController.name]);
58-
5957
appModule.value('gmfContextualdatacontentTemplateUrl', 'gmf/contextualdata');
6058
appModule.run(
6159
/**
6260
* @ngInject
6361
* @param {angular.ITemplateCacheService} $templateCache
6462
*/
65-
($templateCache) => {
66-
// @ts-ignore: webpack
67-
$templateCache.put('gmf/contextualdata', require('./contextualdata.html'));
68-
},
63+
[
64+
'$templateCache',
65+
($templateCache) => {
66+
// @ts-ignore: webpack
67+
$templateCache.put('gmf/contextualdata', require('./contextualdata.html'));
68+
},
69+
],
6970
);
70-
7171
appModule.controller('DesktopController', Controller);
72-
7372
export default appModule;

contribs/gmf/apps/desktop_alt/Controller.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
import './sass/desktop_alt.scss';
3030
import './sass/vars_desktop_alt.scss';
31-
3231
import angular from 'angular';
3332
import gmfControllersAbstractDesktopController, {
3433
AbstractDesktopController,
@@ -53,7 +52,6 @@ class Controller extends AbstractDesktopController {
5352
*/
5453
constructor($scope, $injector) {
5554
super($scope, $injector);
56-
5755
if (this.dimensions.FLOOR == undefined) {
5856
this.dimensions.FLOOR = '*';
5957
}
@@ -62,16 +60,12 @@ class Controller extends AbstractDesktopController {
6260
* @type {boolean}
6361
*/
6462
this.drawLidarprofilePanelActive = false;
65-
6663
const drawLidarprofilePanelActive = new ngeoMiscToolActivate(this, 'drawLidarprofilePanelActive');
6764
this.ngeoToolActivateMgr.registerTool('mapTools', drawLidarprofilePanelActive, false);
68-
6965
const $timeout = $injector.get('$timeout');
70-
7166
panels.getActiveToolPanel().subscribe({
7267
next: (panel) => {
7368
this.drawLidarprofilePanelActive = panel === 'lidar';
74-
7569
$timeout(() => {}); // this triggered on DOM click, we call $timeout to force Angular digest
7670
},
7771
});
@@ -82,7 +76,7 @@ class Controller extends AbstractDesktopController {
8276
*/
8377
onKeydown(event) {}
8478
}
85-
79+
Controller.$inject = ['$scope', '$injector'];
8680
/**
8781
* @hidden
8882
*/
@@ -95,7 +89,5 @@ const appModule = angular.module('Appdesktop_alt', [
9589
ngeoStreetviewModule.name,
9690
ngeoStatemanagerWfsPermalink.name,
9791
]);
98-
9992
appModule.controller('AlternativeDesktopController', Controller);
100-
10193
export default appModule;

contribs/gmf/apps/oeedit/Controller.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
import './sass/vars_oeedit.scss';
3030
import './sass/oeedit.scss';
31-
3231
import angular from 'angular';
3332
import gmfControllersAbstractDesktopController, {
3433
AbstractDesktopController,
@@ -64,12 +63,9 @@ class Controller extends AbstractDesktopController {
6463
* @type {import('ngeo/misc/ToolActivateMgr').ToolActivateMgr}
6564
*/
6665
const ngeoToolActivateMgr = $injector.get('ngeoToolActivateMgr');
67-
6866
ngeoToolActivateMgr.unregisterGroup('mapTools');
69-
7067
const oeEditToolActivate = new ngeoMiscToolActivate(this, 'oeEditActive');
7168
ngeoToolActivateMgr.registerTool('mapTools', oeEditToolActivate, true);
72-
7369
const queryToolActivate = new ngeoMiscToolActivate(this, 'queryActive');
7470
ngeoToolActivateMgr.registerTool('mapTools', queryToolActivate, false);
7571

@@ -114,7 +110,6 @@ class Controller extends AbstractDesktopController {
114110
* @type {import('gmf/theme/Themes').ThemesService} gmfObjectEditingManager The gmf theme service
115111
*/
116112
const gmfThemes = $injector.get('gmfThemes');
117-
118113
gmfThemes.getThemesObject().then((themes) => {
119114
if (themes) {
120115
// Add layer vector after
@@ -143,7 +138,6 @@ class Controller extends AbstractDesktopController {
143138
* @type {?import('ol/Feature').default<import('ol/geom/Geometry').default>}
144139
*/
145140
this.oeFeature = null;
146-
147141
gmfObjectEditingManager.getFeature().then((feature) => {
148142
this.oeFeature = feature;
149143
if (feature) {
@@ -152,7 +146,7 @@ class Controller extends AbstractDesktopController {
152146
});
153147
}
154148
}
155-
149+
Controller.$inject = ['$scope', '$injector', '$timeout'];
156150
/**
157151
* @hidden
158152
*/
@@ -161,26 +155,25 @@ const appModule = angular.module('Appoeedit', [
161155
gmfControllersAbstractDesktopController.name,
162156
gmfObjecteditingModule.name,
163157
]);
164-
165158
appModule.value('gmfContextualdatacontentTemplateUrl', 'gmf/contextualdata');
166159
appModule.run(
167160
/**
168161
* @ngInject
169162
* @param {angular.ITemplateCacheService} $templateCache
170163
*/
171-
($templateCache) => {
172-
// @ts-ignore: webpack
173-
$templateCache.put('gmf/contextualdata', require('./contextualdata.html'));
174-
},
164+
[
165+
'$templateCache',
166+
($templateCache) => {
167+
// @ts-ignore: webpack
168+
$templateCache.put('gmf/contextualdata', require('./contextualdata.html'));
169+
},
170+
],
175171
);
176-
177172
appModule.value(
178173
'gmfPermalinkOptions',
179-
/** @type {import('gmf/options').gmfPermalinkOptions} */ ({
174+
/** @type {import('gmf/options').gmfPermalinkOptions} */ {
180175
pointRecenterZoom: 10,
181-
}),
176+
},
182177
);
183-
184178
appModule.controller('OEEditController', Controller);
185-
186179
export default appModule;

contribs/gmf/examples/backgroundlayerselector.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
MainController.$inject = ['gmfThemes'];
12
// The MIT License (MIT)
23
//
34
// Copyright (c) 2016-2024 Camptocamp SA
@@ -22,9 +23,7 @@
2223
import angular from 'angular';
2324
import './backgroundlayerselector.css';
2425
import gmfBackgroundlayerselectorModule from 'gmf/backgroundlayerselector/module';
25-
2626
import gmfMapComponent from 'gmf/map/component';
27-
2827
import gmfThemeThemes from 'gmf/theme/Themes';
2928
import EPSG2056 from 'ngeo/proj/EPSG_2056';
3029
import olMap from 'ol/Map';
@@ -65,8 +64,6 @@ function MainController(gmfThemes) {
6564
}),
6665
});
6766
}
68-
6967
myModule.controller('MainController', MainController);
7068
options(myModule);
71-
7269
export default myModule;

contribs/gmf/examples/contextualdata.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import angular from 'angular';
2323
import './contextualdata.css';
2424
import gmfContextualdataModule from 'gmf/contextualdata/module';
25-
2625
import gmfMapComponent from 'gmf/map/component';
2726
import ngeoMiscFilters from 'ngeo/misc/filters';
2827
import ngeoMapModule from 'ngeo/map/module';
@@ -45,7 +44,6 @@ const myModule = angular.module('gmfapp', [
4544
ngeoMiscFilters.name,
4645
ngeoMapModule.name,
4746
]);
48-
4947
myModule.value('gmfContextualdatacontentTemplateUrl', 'partials/contextualdata.html');
5048

5149
/**
@@ -83,12 +81,9 @@ MainController.prototype.onRasterData = function (coordinate, data) {
8381
elelvation_diff: data.srtm - data.aster,
8482
};
8583
};
86-
8784
myModule.controller('MainController', MainController);
8885
myModule.constant('gmfContextualDataOptions', {
8986
projections: ['EPSG:2056', 'EPSG:21781', 'EPSG:4326'],
9087
});
91-
9288
options(myModule);
93-
9489
export default MainController;

contribs/gmf/examples/datepicker.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
MainController.$inject = ['ngeoWMSTime'];
12
// The MIT License (MIT)
23
//
34
// Copyright (c) 2016-2024 Camptocamp SA
@@ -22,7 +23,6 @@
2223
import angular from 'angular';
2324
import './datepicker.css';
2425
import ngeoMiscDatepickerComponent from 'ngeo/misc/datepickerComponent';
25-
2626
import ngeoMiscWMSTime from 'ngeo/misc/WMSTime';
2727
import {TimePropertyWidgetEnum, TimePropertyResolutionEnum, TimePropertyModeEnum} from 'ngeo/datasource/OGC';
2828
import options from './options';
@@ -64,11 +64,11 @@ function MainController(ngeoWMSTime) {
6464
* @type {import('ngeo/datasource/OGC').TimeProperty}
6565
*/
6666
this.wmsTimeValueMode = {
67-
widget: /** @type {TimePropertyWidgetEnum} */ ('datepicker'),
67+
widget: /** @type {TimePropertyWidgetEnum} */ 'datepicker',
6868
maxValue: '2015-12-31T00:00:00Z',
6969
minValue: '2014-01-01T00:00:00Z',
70-
resolution: /** @type {TimePropertyResolutionEnum}*/ ('month'),
71-
mode: /** @type {TimePropertyModeEnum} */ ('value'),
70+
resolution: /** @type {TimePropertyResolutionEnum}*/ 'month',
71+
mode: /** @type {TimePropertyModeEnum} */ 'value',
7272
interval: [0, 1, 0, 0],
7373
};
7474

@@ -98,8 +98,6 @@ function MainController(ngeoWMSTime) {
9898
this.rangeValue = this.ngeoWMSTime_.formatWMSTimeParam(this.wmsTimeRangeMode, date);
9999
};
100100
}
101-
102101
myModule.controller('MainController', MainController);
103102
options(myModule);
104-
105103
export default myModule;

contribs/gmf/examples/displayquerygrid.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
MainController.$inject = ['gmfThemes', 'gmfDataSourcesManager', 'gmfThemeManager', 'defaultTheme'];
2+
QueryresultController.$inject = ['ngeoQueryResult'];
13
// The MIT License (MIT)
24
//
35
// Copyright (c) 2016-2024 Camptocamp SA
@@ -23,15 +25,10 @@ import angular from 'angular';
2325
import './displayquerygrid.css';
2426
import './gmf-hidden.inc.css';
2527
import gmfDatasourceManager from 'gmf/datasource/Manager';
26-
2728
import gmfLayertreeComponent from 'gmf/layertree/component';
28-
2929
import gmfMapComponent from 'gmf/map/component';
30-
3130
import ngeoMapFeatureOverlayMgr from 'ngeo/map/FeatureOverlayMgr';
32-
3331
import gmfQueryGridComponent from 'gmf/query/gridComponent';
34-
3532
import gmfThemeManager from 'gmf/theme/Manager';
3633
import gmfThemeThemes from 'gmf/theme/Themes';
3734
import ngeoGridModule from 'ngeo/grid/module';
@@ -58,7 +55,8 @@ const myModule = angular.module('gmfapp', [
5855
gmfThemeManager.name,
5956
gmfThemeThemes.name,
6057
ngeoGridModule.name,
61-
ngeoMapModule.name, // for ngeo.map.FeatureOverlay, perhaps remove me
58+
ngeoMapModule.name,
59+
// for ngeo.map.FeatureOverlay, perhaps remove me
6260
ngeoMiscBtnComponent.name,
6361
ngeoQueryComponent.name,
6462
]);
@@ -75,7 +73,6 @@ const queryresultComponent = {
7573
// @ts-ignore: webpack
7674
template: require('./partials/queryresult.html'),
7775
};
78-
7976
myModule.component('gmfappQueryresult', queryresultComponent);
8077

8178
/**
@@ -91,7 +88,6 @@ function QueryresultController(ngeoQueryResult) {
9188
*/
9289
this.result = ngeoQueryResult;
9390
}
94-
9591
myModule.controller('gmfappQueryresultController', QueryresultController);
9692

9793
/**
@@ -148,7 +144,6 @@ function MainController(gmfThemes, gmfDataSourcesManager, gmfThemeManager, defau
148144
* @type {import('gmf/themes').GmfTheme} The selected theme.
149145
*/
150146
this.selectedTheme = null;
151-
152147
this.updateTheme = function () {
153148
gmfThemeManager.addTheme(this.selectedTheme);
154149
};
@@ -157,7 +152,6 @@ function MainController(gmfThemes, gmfDataSourcesManager, gmfThemeManager, defau
157152
* @type {boolean}
158153
*/
159154
this.queryGridActive = true;
160-
161155
gmfThemes.getThemesObject().then((themes) => {
162156
if (themes) {
163157
this.themes = themes;
@@ -171,23 +165,29 @@ function MainController(gmfThemes, gmfDataSourcesManager, gmfThemeManager, defau
171165
});
172166
}
173167
});
174-
175168
ngeoMapFeatureOverlayMgr.init(this.map);
176169
}
177-
178170
myModule.controller('MainController', MainController);
179-
180171
myModule.constant('gmfDisplayQueryGridOptions', {
181172
featuresStyle: {
182-
fill: {color: [255, 170, 0, 0.6]},
173+
fill: {
174+
color: [255, 170, 0, 0.6],
175+
},
183176
circle: {
184-
fill: {color: [255, 170, 0, 0.6]},
177+
fill: {
178+
color: [255, 170, 0, 0.6],
179+
},
185180
radius: 5,
186-
stroke: {color: [255, 170, 0, 1], width: 2},
181+
stroke: {
182+
color: [255, 170, 0, 1],
183+
width: 2,
184+
},
185+
},
186+
stroke: {
187+
color: [255, 170, 0, 1],
188+
width: 2,
187189
},
188-
stroke: {color: [255, 170, 0, 1], width: 2},
189190
},
190191
});
191192
options(myModule);
192-
193193
export default myModule;

0 commit comments

Comments
 (0)