siad007/versioncontrol_hg

View on GitHub
docs/api/phpdoc/js/jquery.panzoom.js

Summary

Maintainability
F
1 wk
Test Coverage

File jquery.panzoom.js has 381 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * jQuery PanZoom Plugin
 * Pan and zoom an image within a parent div.
 *
 * version: 0.9.0
Severity: Minor
Found in docs/api/phpdoc/js/jquery.panzoom.js - About 5 hrs to fix

    Function setupBindings has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function setupBindings() {
    
            eventData = { target: this }
    
            // bind up controls
    Severity: Major
    Found in docs/api/phpdoc/js/jquery.panzoom.js - About 2 hrs to fix

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

          function validatePosition() {
              var data = this.data('panZoom');
              // if dimensions are too small...
              if ( data.position.x2 - data.position.x1 < settings.min_width/settings.factor || data.position.y2 - data.position.y1 < settings.min_height/settings.factor ) {
                  // and second co-ords are zero (IE: no dims set), fit image
      Severity: Minor
      Found in docs/api/phpdoc/js/jquery.panzoom.js - About 1 hr to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                'panDown': function () {
                    var data = this.data('panZoom');
                    var steps = getStepDimensions.apply(this);
                    data.position.y1 = data.position.y1*1 + steps.pan.y;
                    data.position.y2 = data.position.y2*1 + steps.pan.y;
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 4 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 161..167

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 133.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                'panRight': function () {
                    var data = this.data('panZoom');
                    var steps = getStepDimensions.apply(this);
                    data.position.x1 = data.position.x1*1 + steps.pan.x;
                    data.position.x2 = data.position.x2*1 + steps.pan.x;
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 4 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 145..151

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 133.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    if (current > target) {
                        new_width = getHeight.apply(this) * target;
                        diff = getWidth.apply(this) - new_width;
                        data.position.x1 = data.position.x1*1 + (diff/2);
                        data.position.x2 = data.position.x2*1 - (diff/2);
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 356..361

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 112.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    } else if (current < target) {
                        new_height = getWidth.apply(this) / target;
                        diff = getHeight.apply(this) - new_height;
                        data.position.y1 = data.position.y1*1 + (diff/2);
                        data.position.y2 = data.position.y2*1 - (diff/2);
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 351..361

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 112.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                if (settings.zoomIn) {
                    settings.zoomIn.bind('mousedown.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseDown', 'zoomIn');
                    }).bind('mouseleave.panZoom mouseup.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseUp');
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 5 other locations - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 224..230
        docs/api/phpdoc/js/jquery.panzoom.js on lines 232..238
        docs/api/phpdoc/js/jquery.panzoom.js on lines 240..246
        docs/api/phpdoc/js/jquery.panzoom.js on lines 248..254
        docs/api/phpdoc/js/jquery.panzoom.js on lines 256..262

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 109.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                if (settings.panUp) {
                    settings.panUp.bind('mousedown.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseDown', 'panUp');
                    }).bind('mouseleave.panZoom mouseup.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseUp');
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 5 other locations - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 216..222
        docs/api/phpdoc/js/jquery.panzoom.js on lines 224..230
        docs/api/phpdoc/js/jquery.panzoom.js on lines 240..246
        docs/api/phpdoc/js/jquery.panzoom.js on lines 248..254
        docs/api/phpdoc/js/jquery.panzoom.js on lines 256..262

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 109.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                if (settings.panLeft) {
                    settings.panLeft.bind('mousedown.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseDown', 'panLeft');
                    }).bind('mouseleave.panZoom mouseup.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseUp');
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 5 other locations - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 216..222
        docs/api/phpdoc/js/jquery.panzoom.js on lines 224..230
        docs/api/phpdoc/js/jquery.panzoom.js on lines 232..238
        docs/api/phpdoc/js/jquery.panzoom.js on lines 240..246
        docs/api/phpdoc/js/jquery.panzoom.js on lines 256..262

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 109.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                if (settings.zoomOut) {
                    settings.zoomOut.bind('mousedown.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseDown', 'zoomOut');
                    }).bind('mouseleave.panZoom mouseup.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseUp');
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 5 other locations - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 216..222
        docs/api/phpdoc/js/jquery.panzoom.js on lines 232..238
        docs/api/phpdoc/js/jquery.panzoom.js on lines 240..246
        docs/api/phpdoc/js/jquery.panzoom.js on lines 248..254
        docs/api/phpdoc/js/jquery.panzoom.js on lines 256..262

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 109.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                if (settings.panDown) {
                    settings.panDown.bind('mousedown.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseDown', 'panDown');
                    }).bind('mouseleave.panZoom mouseup.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseUp');
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 5 other locations - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 216..222
        docs/api/phpdoc/js/jquery.panzoom.js on lines 224..230
        docs/api/phpdoc/js/jquery.panzoom.js on lines 232..238
        docs/api/phpdoc/js/jquery.panzoom.js on lines 248..254
        docs/api/phpdoc/js/jquery.panzoom.js on lines 256..262

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 109.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                if (settings.panRight) {
                    settings.panRight.bind('mousedown.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseDown', 'panRight');
                    }).bind('mouseleave.panZoom mouseup.panZoom', eventData, function(event) {
                        event.preventDefault(); event.data.target.panZoom('mouseUp');
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 5 other locations - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 216..222
        docs/api/phpdoc/js/jquery.panzoom.js on lines 224..230
        docs/api/phpdoc/js/jquery.panzoom.js on lines 232..238
        docs/api/phpdoc/js/jquery.panzoom.js on lines 240..246
        docs/api/phpdoc/js/jquery.panzoom.js on lines 248..254

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 109.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                'panLeft': function () {
                    var data = this.data('panZoom');
                    var steps = getStepDimensions.apply(this);
                    data.position.x1 -= steps.pan.x;
                    data.position.x2 -= steps.pan.x;
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 137..143

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 101.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                'panUp': function () {
                    var data = this.data('panZoom');
                    var steps = getStepDimensions.apply(this);
                    data.position.y1 -= steps.pan.y;
                    data.position.y2 -= steps.pan.y;
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 3 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 153..159

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 101.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        if (data.position.y2 - data.position.y1 < settings.min_height/settings.factor) {
                          data.position.y2 = data.position.y1*1+settings.min_height/settings.factor;
                        }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 2 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 339..341

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 86.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        if (data.position.x2 - data.position.x1 < settings.min_width/settings.factor) {
                            data.position.x2 = data.position.x1*1+settings.min_width/settings.factor;
                        }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 2 hrs to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 342..344

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 86.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    zoom: {
                        x: (settings.zoom_step/100 * data.viewport_dimensions.x),
                        y: (settings.zoom_step/100 * data.viewport_dimensions.y)
                    },
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 1 hr to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 447..450

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    pan: {
                        x: (settings.pan_step/100 * data.viewport_dimensions.x),
                        y: (settings.pan_step/100 * data.viewport_dimensions.y)
                    }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 1 hr to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 443..446

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

          function getWidth() {
                var data = this.data('panZoom');
            width = (data.position.x2 - data.position.x1);
            return width;
          }
        Severity: Minor
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 55 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 416..420

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 53.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

          function getHeight() {
                var data = this.data('panZoom');
                height = (data.position.y2 - data.position.y1);
            return height;
          }
        Severity: Minor
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 1 other location - About 55 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 405..409

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 53.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                 if (settings.out_x2) { settings.out_x2.val(Math.round(data.position.x2 / settings.factor)) }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 45 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 434..434
        docs/api/phpdoc/js/jquery.panzoom.js on lines 435..435
        docs/api/phpdoc/js/jquery.panzoom.js on lines 437..437

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 50.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                 if (settings.out_y1) { settings.out_y1.val(Math.round(data.position.y1 / settings.factor)) }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 45 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 434..434
        docs/api/phpdoc/js/jquery.panzoom.js on lines 436..436
        docs/api/phpdoc/js/jquery.panzoom.js on lines 437..437

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 50.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                 if (settings.out_x1) { settings.out_x1.val(Math.round(data.position.x1 / settings.factor)) }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 45 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 435..435
        docs/api/phpdoc/js/jquery.panzoom.js on lines 436..436
        docs/api/phpdoc/js/jquery.panzoom.js on lines 437..437

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 50.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                 if (settings.out_y2) { settings.out_y2.val(Math.round(data.position.y2 / settings.factor)) }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 45 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 434..434
        docs/api/phpdoc/js/jquery.panzoom.js on lines 435..435
        docs/api/phpdoc/js/jquery.panzoom.js on lines 436..436

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 50.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                         if (settings.out_y1) { data.position.y1 = settings.out_y1.val()*settings.factor }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 30 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 89..89
        docs/api/phpdoc/js/jquery.panzoom.js on lines 91..91
        docs/api/phpdoc/js/jquery.panzoom.js on lines 92..92

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                         if (settings.out_y2) { data.position.y2 = settings.out_y2.val()*settings.factor }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 30 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 89..89
        docs/api/phpdoc/js/jquery.panzoom.js on lines 90..90
        docs/api/phpdoc/js/jquery.panzoom.js on lines 91..91

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                         if (settings.out_x1) { data.position.x1 = settings.out_x1.val()*settings.factor }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 30 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 90..90
        docs/api/phpdoc/js/jquery.panzoom.js on lines 91..91
        docs/api/phpdoc/js/jquery.panzoom.js on lines 92..92

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                         if (settings.out_x2) { data.position.x2 = settings.out_x2.val()*settings.factor }
        Severity: Major
        Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 30 mins to fix
        docs/api/phpdoc/js/jquery.panzoom.js on lines 89..89
        docs/api/phpdoc/js/jquery.panzoom.js on lines 90..90
        docs/api/phpdoc/js/jquery.panzoom.js on lines 92..92

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 45.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        There are no issues that match your filters.

        Category
        Status