Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Cleanup dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
loicgasser authored and procrastinatio committed Jan 10, 2019
1 parent 07c52bf commit 9e1a0f2
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/components/ModalDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ goog.provide('ga_modal_directive');
* This directive doesn't have its own isolated scope, and it effectively
* writes to its parent's scope when the modal is shown or hidden.
*/
module.directive('gaModalShow', function($parse, $rootScope) {
module.directive('gaModalShow', function($parse) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/PlaceholderDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ goog.provide('ga_placeholder_directive');
* otherwise the poly-fill is used
*/
module.directive('placeholder',
function($timeout) {
function() {

if ('placeholder' in document.createElement('input') &&
'placeholder' in document.createElement('textarea')) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/contextpopup/ContextPopupDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ goog.require('ga_window_service');
]);

module.directive('gaContextPopup',
function($http, $q, $timeout, $window, $rootScope, gaBrowserSniffer,
gaNetworkStatus, gaPermalink, gaGlobalOptions, gaLang, gaWhat3Words,
gaReframe, gaEvent, gaWindow, gaHeight, gaMeasure) {
function($q, $timeout, $window, $rootScope, gaBrowserSniffer,
gaNetworkStatus, gaPermalink, gaWhat3Words, gaReframe,
gaEvent, gaWindow, gaHeight, gaMeasure) {
return {
restrict: 'A',
replace: true,
Expand Down
6 changes: 3 additions & 3 deletions src/components/draw/DrawDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ goog.require('ga_styles_service');
*
*/
module.directive('gaDraw', function($translate, $rootScope, $timeout,
gaBrowserSniffer, gaDefinePropertiesForLayer, gaDebounce, gaFileStorage,
gaLayerFilters, gaExportKml, gaMapUtils, $document, gaMeasure,
gaStyleFactory, gaGeomUtils, gaEvent, $window) {
gaDefinePropertiesForLayer, gaDebounce, gaFileStorage,
gaExportKml, gaMapUtils, $document, gaMeasure,
gaGeomUtils, gaEvent, $window) {

var createDefaultLayer = function(map, useTemporaryLayer) {
// #2820: we set useSpatialIndex to false to allow display of azimuth
Expand Down
2 changes: 1 addition & 1 deletion src/components/geolocation/GeolocationDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ goog.require('ga_throttle_service');
]);

module.directive('gaGeolocation', function($window, $translate,
gaBrowserSniffer, gaPermalink, gaStyleFactory, gaThrottle, gaMapUtils) {
gaPermalink, gaStyleFactory, gaThrottle, gaMapUtils) {
return {
restrict: 'A',
scope: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/layermanager/LayermanagerDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ goog.require('ga_window_service');
});

module.directive('gaLayermanager', function($compile, $timeout,
$rootScope, $translate, $window, gaBrowserSniffer, gaLayerFilters,
gaLayerMetadataPopup, gaLayers, gaAttribution, gaUrlUtils,
$translate, $window, gaBrowserSniffer, gaLayerFilters,
gaLayerMetadataPopup, gaLayers, gaUrlUtils,
gaMapUtils, gaEvent, gaWindow) {

// Timestamps list template
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/LayersService.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ goog.require('ga_urlutils_service');
*/
module.provider('gaLayers', function() {

this.$get = function($http, $q, $rootScope, $translate, $window,
this.$get = function($http, $q, $rootScope, $window,
gaBrowserSniffer, gaDefinePropertiesForLayer, gaMapUtils,
gaNetworkStatus, gaStorage, gaTileGrid, gaUrlUtils,
gaStylesFromLiterals, gaGlobalOptions, gaPermalink,
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/MapDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ goog.require('ga_styles_service');
};
});

module.directive('gaMap', function($window, $timeout, gaPermalink,
module.directive('gaMap', function($window, gaPermalink,
gaStyleFactory, gaBrowserSniffer, gaLayers, gaDebounce, gaOffline,
gaMapUtils, $translate) {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/MapUtilsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ goog.require('ga_urlutils_service');
*/
module.provider('gaMapUtils', function() {
this.$get = function($window, gaGlobalOptions, gaUrlUtils, $q,
gaDefinePropertiesForLayer, $http, $rootScope, gaHeight) {
gaDefinePropertiesForLayer, $rootScope, gaHeight) {
var resolutions = gaGlobalOptions.resolutions;
var lodsForRes = gaGlobalOptions.lods;
var isExtentEmpty = function(extent) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/map/PermalinkLayersService.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ goog.require('ga_wmts_service');
*/
module.provider('gaPermalinkLayersManager', function() {

this.$get = function($rootScope, gaLayers, gaPermalink, $translate,
this.$get = function($rootScope, gaLayers, gaPermalink,
gaVector, gaMapUtils, gaWms, gaLayerFilters, gaUrlUtils, gaFileStorage,
gaTopic, gaGlobalOptions, $q, gaTime, $log, $http, gaWmts) {
gaTopic, gaGlobalOptions, $q, gaTime, $log, gaWmts) {

// split by commas only not between || (WMS layers) (see #4592)
const splitLayerPattern = /,(?![^|]* )/g;
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/WmtsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ goog.require('ga_urlutils_service');
*/
module.provider('gaWmts', function() {
this.$get = function(gaDefinePropertiesForLayer, gaMapUtils, gaUrlUtils,
gaGlobalOptions, $window, $translate, $http, gaTime) {
gaGlobalOptions, $window, $http) {

// Store getCapabilitites
var store = {};
Expand Down
2 changes: 1 addition & 1 deletion src/components/measure/MeasureDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ goog.require('ga_measure_service');
'ga_measure_service'
]);

module.directive('gaMeasure', function(gaMeasure, gaGlobalOptions) {
module.directive('gaMeasure', function(gaMeasure) {
return {
restrict: 'A',
templateUrl: 'components/measure/partials/measure.html',
Expand Down
5 changes: 2 additions & 3 deletions src/components/profile/ProfileService.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ goog.require('ga_urlutils_service');
};
};

this.$get = function($q, $http, $timeout, $translate, measureFilter,
gaTimeFormatFilter, $window, gaUrlUtils, gaGlobalOptions,
gaGeomUtils) {
this.$get = function($q, $http, $translate, $window,
gaGlobalOptions, gaGeomUtils) {

var d3LibUrl = this.d3libUrl;
var profileUrl = this.profileUrl;
Expand Down
2 changes: 1 addition & 1 deletion src/components/search/SearchDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ goog.require('ga_what3words_service');
var keepSearchParam = false;

module.controller('GaSearchDirectiveController',
function($scope, $rootScope, $sce, $timeout, gaPermalink,
function($scope, $rootScope, $timeout, gaPermalink,
gaUrlUtils, gaSearchGetCoordinate, gaMapUtils, gaMarkerOverlay,
gaVector, gaPreviewLayers, gaLang, gaTopic, gaLayers,
gaSearchTokenAnalyser, gaWhat3Words) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/search/SearchTypesDirectives.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ goog.require('ga_urlutils_service');
);

module.directive('gaSearchLocations',
function($http, $q, $sce, $translate, gaUrlUtils, gaMarkerOverlay,
function($sce, $translate, gaMarkerOverlay,
gaSearchLabels, gaMapUtils, gaDebounce) {
return {
restrict: 'A',
Expand Down
2 changes: 1 addition & 1 deletion src/components/share/ShareCopyInputDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ goog.require('ga_browsersniffer_service');
* This directive adds an help tooltip to copy the input content with the
* keyboard.
*/
module.directive('gaShareCopyInput', function(gaBrowserSniffer, $translate) {
module.directive('gaShareCopyInput', function($translate) {
return {
require: '^^gaShareCopyInputGroup',
restrict: 'A',
Expand Down
2 changes: 1 addition & 1 deletion src/components/share/ShareDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ goog.require('ga_window_service');
'pascalprecht.translate'
]);

module.directive('gaShare', function($http, $rootScope, $timeout, $translate,
module.directive('gaShare', function($rootScope, $timeout, $translate,
$window, gaPermalink, gaUrlUtils, gaWindow, gaBrowserSniffer) {
return {
restrict: 'A',
Expand Down
5 changes: 2 additions & 3 deletions src/components/tooltip/TooltipDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ goog.require('ga_window_service');
module.directive('gaTooltip',
function($timeout, $http, $q, $translate, $sce, $rootScope, gaPopup,
gaLayers, gaBrowserSniffer, gaMapClick, gaDebounce, gaPreviewFeatures,
gaMapUtils, gaTime, gaTopic, gaIdentify, gaGlobalOptions,
gaPermalink, gaIFrameCom, gaUrlUtils, gaLang, gaSanitize, gaEvent,
gaWindow) {
gaMapUtils, gaTopic, gaIdentify, gaPermalink, gaIFrameCom, gaUrlUtils,
gaLang, gaSanitize, gaEvent, gaWindow) {
var popupContent =
'<div ng-repeat="html in options.htmls track by $index" ' +
'ng-mouseenter="options.onMouseEnter($event,' +
Expand Down
2 changes: 1 addition & 1 deletion src/components/topic/TopicService.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ goog.require('ga_permalink');
* Topics manager
*/
module.provider('gaTopic', function() {
this.$get = function($rootScope, $http, $translate, gaPermalink,
this.$get = function($rootScope, $http, gaPermalink,
gaGlobalOptions, gaUrlUtils) {
var topic; // The current topic
var topics = []; // The list of topics available
Expand Down
3 changes: 1 addition & 2 deletions src/components/translation/TranslationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ goog.require('ga_permalink_service');
* Lang manager
*/
module.provider('gaLang', function() {
this.$get = function($window, $rootScope, $translate, gaPermalink,
gaGlobalOptions) {
this.$get = function($window, $translate, gaPermalink, gaGlobalOptions) {
var lang = gaPermalink.getParams().lang ||
($window.navigator.userLanguage ||
$window.navigator.language).split('-')[0];
Expand Down
2 changes: 1 addition & 1 deletion src/js/FeaturetreeController.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ goog.require('ga_translation_service');
]);

module.controller('GaFeaturetreeController', function($http, $scope,
$timeout, gaLang, $window, gaGlobalOptions, gaPrint) {
gaLang, gaGlobalOptions, gaPrint) {

var featureTreeId = '#featuretree-popup';
// List of layers using an extendHtmlPoup for the print instead of htmlPopup
Expand Down
4 changes: 2 additions & 2 deletions src/js/ImportController.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ goog.require('ga_wmts_service');
'ga_vector_service'
]);

module.controller('GaImportController', function($scope, $q, $document,
$window, $timeout, gaFile, gaBrowserSniffer, gaWms, gaUrlUtils,
module.controller('GaImportController', function($scope, $q,
$window, gaFile, gaBrowserSniffer, gaWms, gaUrlUtils,
gaLang, gaPreviewLayers, gaMapUtils, gaWmts, gaVector) {

var servers = [
Expand Down

0 comments on commit 9e1a0f2

Please sign in to comment.