autolab/Autolab

View on GitHub
app/assets/javascripts/jquery.event.drag-2.2.js

Summary

Maintainability
C
1 day
Test Coverage

File jquery.event.drag-2.2.js has 266 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! 
 * jquery.event.drag - v 2.2
 * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
 * Open Source MIT License - http://threedubmedia.com/code/license
 */
Severity: Minor
Found in app/assets/javascripts/jquery.event.drag-2.2.js - About 2 hrs to fix

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

        hijack: function( event, type, dd, x, elem ){
            // not configured
            if ( !dd ) 
                return;
            // remember the original event and type
    Severity: Minor
    Found in app/assets/javascripts/jquery.event.drag-2.2.js - About 1 hr to fix

      Function handler has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          handler: function( event ){ 
              // read the data before hijacking anything
              var dd = event.data;    
              // handle various events
              switch ( event.type ){
      Severity: Minor
      Found in app/assets/javascripts/jquery.event.drag-2.2.js - About 1 hr to fix

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

            init: function( event ){ 
                // sorry, only one touch at a time
                if ( drag.touched ) 
                    return;
                // the drag/drop interaction data
        Severity: Minor
        Found in app/assets/javascripts/jquery.event.drag-2.2.js - About 1 hr to fix

          Function hijack has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              hijack: function( event, type, dd, x, elem ){
          Severity: Minor
          Found in app/assets/javascripts/jquery.event.drag-2.2.js - About 35 mins to fix

            Avoid too many return statements within this function.
            Open

                        return;
            Severity: Major
            Found in app/assets/javascripts/jquery.event.drag-2.2.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return false;
              Severity: Major
              Found in app/assets/javascripts/jquery.event.drag-2.2.js - About 30 mins to fix

                There are no issues that match your filters.

                Category
                Status