superdesk/superdesk-client-core

View on GitHub
scripts/core/upload/crop-directive.ts

Summary

Maintainability
B
4 hrs
Test Coverage

Function link has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            link: function(scope, elem) {
                var bounds, boundx, boundy;

                var updateScope = _.throttle((c) => {
                    scope.$apply(() => {
Severity: Major
Found in scripts/core/upload/crop-directive.ts - About 2 hrs to fix

    Function onload has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                            img.onload = function() {
                                scope.progressWidth = 80;
                                var size = [this['width'], this['height']];
    
                                if (size[0] < 200 || size[1] < 200) {
    Severity: Minor
    Found in scripts/core/upload/crop-directive.ts - About 1 hr to fix

      Function showPreview has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

                      function showPreview(e, rx, ry, boundX, boundY, cordx, cordy) {
      Severity: Major
      Found in scripts/core/upload/crop-directive.ts - About 50 mins to fix

        There are no issues that match your filters.

        Category
        Status