gopheracademy/gcon

View on GitHub
assets/admin/global/plugins/mapplic/mapplic/mapplic.js

Summary

Maintainability
F
2 wks
Test Coverage

Function Mapplic has 871 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var Mapplic = function() {
        var self = this;

        self.o = {
            source: 'locations.json',
Severity: Major
Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 4 days to fix

    File mapplic.js has 883 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Mapplic - Custom Interactive Map Plugin by @sekler
     * Version 3.1
     * http://www.mapplic.com
     */
    Severity: Major
    Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 2 days to fix

      Function processData has 163 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              var processData = function(data) {
                  self.data = data;
                  var nrlevels = 0;
                  var shownLevel;
      
      Severity: Major
      Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 6 hrs to fix

        Function Tooltip has 101 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function Tooltip() {
                    this.el = null;
                    this.shift = 6;
                    this.drop = 0;
                    this.location = null;
        Severity: Major
        Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 4 hrs to fix

          Function addControls has 96 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  var addControls = function() {
                      var map = self.map,
                          mapbody = $('.mapplic-map-image', self.map);
          
                      document.ondragstart = function() { return false; } // IE drag fix
          Severity: Major
          Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 3 hrs to fix

            Function Sidebar has 81 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function Sidebar() {
                        this.el = null;
                        this.list = null;
            
                        this.init = function() {
            Severity: Major
            Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 3 hrs to fix

              Function HoverTooltip has 69 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function HoverTooltip() {
                          this.el = null;
                          this.shift = 6;
              
                          this.init = function() {
              Severity: Major
              Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 2 hrs to fix

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

                        function Minimap() {
                            this.el = null;
                            this.opacity = null;
                
                            this.init = function() {
                Severity: Minor
                Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 1 hr to fix

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

                              this.init = function() {
                                  var s = this;
                  
                                  // Construct
                                  this.el = $('<div></div>').addClass('mapplic-tooltip mapplic-hovertip');
                  Severity: Minor
                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 1 hr to fix

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

                                this.position = function() {
                                    if (this.location) {
                                        var cx = self.map.offset().left + self.map.width() * this.location.x - self.container.offset().left,
                                            cy = self.map.offset().top + self.map.height() * this.location.y - self.container.offset().top;
                    
                    Severity: Minor
                    Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 1 hr to fix

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

                              function Deeplinking() {
                                  this.param = 'location';
                      
                                  this.init = function() {
                                      var s = this;
                      Severity: Minor
                      Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 1 hr to fix

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

                                function ZoomButtons() {
                                    this.el = null;
                                
                                    this.init = function() {
                                        this.el = $('<div></div>').addClass('mapplic-zoom-buttons').appendTo(self.container);
                        Severity: Minor
                        Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 1 hr to fix

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

                                  function FullScreen() {
                                      this.el = null;
                          
                                      this.init = function() {
                                          var s = this;
                          Severity: Minor
                          Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 1 hr to fix

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

                                    var switchLevel = function(target, tooltip) {
                                        switch (target) {
                                            case '+':
                                                target = $('option:selected', self.levelselect).removeAttr('selected').prev().prop('selected', 'selected').val();
                                                break;
                            Severity: Minor
                            Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 1 hr to fix

                              Function zoomTo has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      var zoomTo = function(x, y, s, duration, easing, ry) {
                              Severity: Minor
                              Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 45 mins to fix

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

                                        var moveTo = function(x, y, scale, d, easing) {
                                Severity: Minor
                                Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js - About 35 mins to fix

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

                                                  this.zoomout.on('click touchstart', function(e) {
                                                      e.preventDefault();
                                  
                                                      var scale = self.scale;
                                                      self.scale = normalizeScale(scale - scale * 0.4);
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 day to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 582..592

                                  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 213.

                                  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

                                                  this.zoomin.on('click touchstart', function(e) {
                                                      e.preventDefault();
                                  
                                                      var scale = self.scale;
                                                      self.scale = normalizeScale(scale + scale * 0.8);
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 day to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 596..606

                                  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 213.

                                  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 (this.el.outerWidth()/2 > cx)
                                                              verticalPos = 0.5 - (this.el.outerWidth()/2 - cx)/this.el.outerWidth();
                                                          else if ((self.container.width() - cx - this.el.outerWidth()/2) < 0)
                                                              verticalPos = 0.5 + (cx + this.el.outerWidth()/2 - self.container.width())/this.el.outerWidth(); 
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 6 hrs to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 287..290

                                  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 173.

                                  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 (this.el.outerWidth()/2 > cx)
                                                      verticalPos = 0.5 - (this.el.outerWidth()/2 - cx)/this.el.outerWidth();
                                                  else if ((self.container.width() - cx - this.el.outerWidth()/2) < 0)
                                                      verticalPos = 0.5 + (cx + this.el.outerWidth()/2 - self.container.width())/this.el.outerWidth(); 
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 6 hrs to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 181..184

                                  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 173.

                                  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

                                          var normalizeX = function(x) {
                                              var minX = self.container.width() - self.contentWidth * self.scale;
                                  
                                              if (minX < 0) {
                                                  if (x > 0) x = 0;
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 3 hrs to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 1139..1149

                                  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 104.

                                  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

                                          var normalizeY = function(y) {
                                              var minY = self.container.height() - self.contentHeight * self.scale;
                                  
                                              if (minY < 0) {
                                                  if (y >= 0) y = 0;
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 3 hrs to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 1127..1137

                                  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 104.

                                  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

                                                  self.y = normalizeY(self.y - (event.pageY - self.container.offset().top - self.y) * (self.scale/scale - 1));
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 3 other locations - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 947..947
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 960..960
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 961..961

                                  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 70.

                                  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

                                                  self.x = normalizeX(self.x - (event.pageX - self.container.offset().left - self.x) * (self.scale/scale - 1));
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 3 other locations - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 948..948
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 960..960
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 961..961

                                  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 70.

                                  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

                                                  self.x = normalizeX(self.x - (event.pageX - self.container.offset().left - self.x) * (self.scale/scale - 1));
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 3 other locations - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 947..947
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 948..948
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 961..961

                                  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 70.

                                  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

                                                  self.y = normalizeY(self.y - (event.pageY - self.container.offset().top - self.y) * (self.scale/scale - 1));
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 3 other locations - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 947..947
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 948..948
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 960..960

                                  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 70.

                                  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

                                                          cy = self.map.offset().top + self.map.height() * this.location.y - self.container.offset().top;
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 162..162

                                  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 66.

                                  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

                                                      var cx = self.map.offset().left + self.map.width() * this.location.x - self.container.offset().left,
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 163..163

                                  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 66.

                                  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

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

                                                          if (Math.abs(mt) > cy) {
                                                              mt = 8 + 2;
                                                              this.el.addClass('mapplic-bottom');
                                                          }
                                                          else this.el.removeClass('mapplic-bottom');
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 280..284

                                  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 65.

                                  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

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

                                                  if (Math.abs(mt) > cy) {
                                                      mt = 8 + 2;
                                                      this.el.addClass('mapplic-bottom');
                                                  }
                                                  else this.el.removeClass('mapplic-bottom');
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 174..178

                                  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 65.

                                  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

                                                  var cx = self.map.offset().left + self.map.width() * location.x - self.container.offset().left,
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 270..270

                                  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 62.

                                  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

                                                      cy = self.map.offset().top + self.map.height() * location.y - self.container.offset().top;
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 269..269

                                  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 62.

                                  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

                                                      height = Math.round(self.container.height() / self.contentHeight / self.scale * this.el.height()),
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 409..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 55.

                                  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

                                                  var width = Math.round(self.container.width() / self.contentWidth / self.scale * this.el.width()),
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 1 hr to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 410..410

                                  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 55.

                                  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

                                                  down.click(function(e) {
                                                      e.preventDefault();
                                                      if (!$(this).hasClass('mapplic-disabled')) switchLevel('-');
                                                  });
                                  Severity: Minor
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 50 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 837..840

                                  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 52.

                                  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

                                                  case '+':
                                                      target = $('option:selected', self.levelselect).removeAttr('selected').prev().prop('selected', 'selected').val();
                                                      break;
                                  Severity: Minor
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 50 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 1045..1047

                                  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 52.

                                  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

                                                  case '-':
                                                      target = $('option:selected', self.levelselect).removeAttr('selected').next().prop('selected', 'selected').val();
                                                      break;
                                  Severity: Minor
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 50 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 1042..1044

                                  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 52.

                                  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

                                                  up.click(function(e) {
                                                      e.preventDefault();
                                                      if (!$(this).hasClass('mapplic-disabled')) switchLevel('+');
                                                  });
                                  Severity: Minor
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 50 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 842..845

                                  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 52.

                                  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 (location.link) this.link.attr('href', location.link).show();
                                                      else this.link.hide();
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 3 other locations - About 45 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 107..108
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 133..134
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 136..137

                                  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 (location.link) this.link.attr('href', location.link).show();
                                                      else this.link.hide();
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 3 other locations - About 45 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 107..108
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 110..111
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 133..134

                                  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 (location.image) this.image.attr('src', location.image).show();
                                                      else this.image.hide();
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 3 other locations - About 45 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 107..108
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 110..111
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 136..137

                                  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 (location.image) this.image.attr('src', location.image).show();
                                                      else this.image.hide();
                                  Severity: Major
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 3 other locations - About 45 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 110..111
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 133..134
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 136..137

                                  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 2 locations. Consider refactoring.
                                  Open

                                              if (self.o.hovertip) {
                                                  self.hovertip = new HoverTooltip();
                                                  self.hovertip.init();
                                              }
                                  Severity: Minor
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 35 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 681..684

                                  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 47.

                                  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 (self.o.minimap) {
                                                  self.minimap = new Minimap();
                                                  self.minimap.init();
                                              }
                                  Severity: Minor
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 35 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 803..806

                                  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 47.

                                  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

                                                      top = Math.round(-y / self.contentHeight / self.scale * this.el.height()),
                                  Severity: Minor
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 35 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 412..412

                                  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 46.

                                  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

                                                      left = Math.round(-x / self.contentWidth / self.scale * this.el.width()),
                                  Severity: Minor
                                  Found in assets/admin/global/plugins/mapplic/mapplic/mapplic.js and 1 other location - About 35 mins to fix
                                  assets/admin/global/plugins/mapplic/mapplic/mapplic.js on lines 411..411

                                  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 46.

                                  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