newscoop/JS-Scoopwriter

View on GitHub
app/scripts/directives/dropped-image.js

Summary

Maintainability
C
1 day
Test Coverage

Function postLink has 200 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            link: function postLink(scope, element, attrs, controllers) {
                var ctrl = controllers[0],
                    imgConfig = {},
                    parentCtrl = controllers[1],
                    $element = $(element),
Severity: Major
Found in app/scripts/directives/dropped-image.js - About 1 day to fix

    Function setSize has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    scope.setSize = function (size, initPhase) {
                        var width;
    
                        $parent = findParent();
                        if (size.match(/^\d+px$/)) {
    Severity: Minor
    Found in app/scripts/directives/dropped-image.js - About 1 hr to fix

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

                      scope.setAlignment = function (position) {
                          var cssFloat,
                              cssMargin;
      
                          switch (position) {
      Severity: Minor
      Found in app/scripts/directives/dropped-image.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status