Naimikan/angular-mapboxgl-directive

View on GitHub

Showing 29 of 98 total issues

Function mapboxGlDirectiveLink has 151 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function mapboxGlDirectiveLink (scope, element, attrs, controller) {
    if (!mapboxgl) {
      throw new Error('Mapbox GL doesn\`t included');
    }

Severity: Major
Found in src/directives/mapboxgl.js - About 6 hrs to fix

    Function mapboxGlControlsDirectiveLink has 147 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function mapboxGlControlsDirectiveLink (scope, element, attrs, controller) {
            if (!controller) {
                throw new Error('Invalid angular-mapboxgl-directive controller');
            }
    
    
    Severity: Major
    Found in src/directives/glControls.js - About 5 hrs to fix

      Function mapboxGlLayersDirectiveLink has 129 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function mapboxGlLayersDirectiveLink (scope, element, attrs, controller) {
          if (!controller) {
                  throw new Error('Invalid angular-mapboxgl-directive controller');
              }
      
      
      Severity: Major
      Found in src/directives/glLayers.js - About 5 hrs to fix

        Function mapboxGlSourcesDirectiveLink has 73 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function mapboxGlSourcesDirectiveLink (scope, element, attrs, controller) {
            if (!controller) {
                    throw new Error('Invalid angular-mapboxgl-directive controller');
                }
        
        
        Severity: Major
        Found in src/directives/glSources.js - About 2 hrs to fix

          Function updateLayerByObject has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            LayersManager.prototype.updateLayerByObject = function (layerObject) {
              Utils.checkObjects([
                {
                  name: 'Map',
                  object: this.mapInstance
          Severity: Major
          Found in src/factories/layersManager.js - About 2 hrs to fix

            Function mapboxGlCompareDirectiveLink has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function mapboxGlCompareDirectiveLink (scope, element, attrs) {
                if (!mapboxgl) {
                  throw new Error('Mapbox GL does not included');
                }
            
            
            Severity: Minor
            Found in src/directives/mapboxglCompare.js - About 1 hr to fix

              Function updateSourceByObject has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                SourcesManager.prototype.updateSourceByObject = function (sourceObject) {
                  var self = this;
              
                  Utils.checkObjects([
                    {
              Severity: Minor
              Found in src/factories/sourcesManager.js - About 1 hr to fix

                Function mapboxGlDirectiveController has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function mapboxGlDirectiveController ($scope) {
                    var mapboxGlMap = $q.defer();
                
                    angular.extend(this, {
                      _mapboxGlMap: mapboxGlMap,
                Severity: Minor
                Found in src/directives/mapboxgl.js - About 1 hr to fix

                  Function createPopupByObject has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    PopupsManager.prototype.createPopupByObject = function (object, feature) {
                      var self = this;
                  
                      Utils.checkObjects([
                        {
                  Severity: Minor
                  Found in src/factories/popupsManager.js - About 1 hr to fix

                    Function enableLayerEvents has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function enableLayerEvents (map) {
                          map.on('click', function (event) {
                            event.originalEvent.preventDefault();
                            event.originalEvent.stopPropagation();
                    
                    
                    Severity: Minor
                    Found in src/directives/glLayers.js - About 1 hr to fix

                      Function createLayerByObject has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        LayersManager.prototype.createLayerByObject = function (layerObject) {
                          Utils.checkObjects([
                            {
                              name: 'Map',
                              object: this.mapInstance
                      Severity: Minor
                      Found in src/factories/layersManager.js - About 1 hr to fix

                        Function createSourceByObject has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          SourcesManager.prototype.createSourceByObject = function (sourceObject) {
                            var self = this;
                        
                            Utils.checkObjects([
                              {
                        Severity: Minor
                        Found in src/factories/sourcesManager.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                      } else if (angular.isArray(center) && center.length === 2 && angular.isNumber(center[0]) && angular.isNumber(center[1]) && (center[0] > -180 || center[0] < 180) && (center[1] > -90 || center[1] < 90)) {
                                          defer.resolve(center);
                                      } else {
                                          defer.resolve(false);
                                      }
                          Severity: Critical
                          Found in src/factories/utils.js - About 1 hr to fix

                            Function mapboxGlVideoDirectiveLink has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function mapboxGlVideoDirectiveLink (scope, element, attrs, controller) {
                                    if (!controller) {
                                        throw new Error('Invalid angular-mapboxgl-directive controller');
                                    }
                            
                            
                            Severity: Minor
                            Found in src/directives/glVideo.js - About 1 hr to fix

                              Function mapboxGlImageDirectiveLink has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function mapboxGlImageDirectiveLink (scope, element, attrs, controller) {
                                      if (!controller) {
                                          throw new Error('Invalid angular-mapboxgl-directive controller');
                                      }
                              
                              
                              Severity: Minor
                              Found in src/directives/glImage.js - About 1 hr to fix

                                Function initAnimationSystem has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  AnimationsManager.prototype.initAnimationSystem = function () {
                                    var lastTime = 0;
                                    var vendors = ['ms', 'moz', 'webkit', 'o'];
                                
                                    for (var iterator = 0; iterator < vendors.length && !window.requestAnimationFrame; ++iterator) {
                                Severity: Minor
                                Found in src/factories/animationsManager.js - About 1 hr to fix

                                  Function createMarkerByObject has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    MarkersManager.prototype.createMarkerByObject = function (object) {
                                      Utils.checkObjects([
                                        {
                                          name: 'Map',
                                          object: this.mapInstance
                                  Severity: Minor
                                  Found in src/factories/markersManager.js - About 1 hr to fix

                                    Function mapboxGlMarkersDirectiveLink has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function mapboxGlMarkersDirectiveLink (scope, element, attrs, controller) {
                                        if (!controller) {
                                                throw new Error('Invalid angular-mapboxgl-directive controller');
                                            }
                                    
                                    
                                    Severity: Minor
                                    Found in src/directives/glMarkers.js - About 1 hr to fix

                                      Function mapboxGlPopupDirectiveLink has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function mapboxGlPopupDirectiveLink (scope, element, attrs, controller) {
                                          if (!controller) {
                                                  throw new Error('Invalid angular-mapboxgl-directive controller');
                                              }
                                      
                                      
                                      Severity: Minor
                                      Found in src/directives/glPopups.js - About 1 hr to fix

                                        Function generatePopupMessage has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          PopupsManager.prototype.generatePopupMessage = function (object, feature) {
                                            var popupMessage = angular.copy(object.message);
                                        
                                            if (popupMessage instanceof HTMLElement) {
                                              return popupMessage;
                                        Severity: Minor
                                        Found in src/factories/popupsManager.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language