betajs/betajs-media-components

View on GitHub
src/dynamics/_common/helperframe.js

Summary

Maintainability
D
2 days
Test Coverage

Function create has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            create: function() {
                var _interactionEvent;
                var _frameClicksCount = 0;
                this.__parent = this.parent();
                this.__initialSettings = {
Severity: Major
Found in src/dynamics/_common/helperframe.js - About 3 hrs to fix

    File helperframe.js has 288 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    Scoped.define("module:Common.Dynamics.Helperframe", [
        "dynamics:Dynamic",
        "base:Async",
        "base:Timers.Timer",
        "base:Objs",
    Severity: Minor
    Found in src/dynamics/_common/helperframe.js - About 2 hrs to fix

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

                  __handleMouseMoveEvent: function(ev) {
                      var setTranslate = function(el, posX, posY) {
                          el.style.transform = "translate3d(" + posX + "px, " + posY + "px, 0)";
                      };
      
      
      Severity: Minor
      Found in src/dynamics/_common/helperframe.js - About 1 hr to fix

        Function fitFrameViewOnScreenVideo has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    fitFrameViewOnScreenVideo: function() {
        
                        // It will be accessible when at least one of the
                        // EventListeners will be fired
                        var vts = this.recorder._recorder._videoTrackSettings;
        Severity: Minor
        Found in src/dynamics/_common/helperframe.js - About 1 hr to fix

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

                          if (ev.type === "touchmove") {
                              this.__positions.currentX = ev.touches[0].clientX - this.__positions.initialX;
                              this.__positions.currentY = ev.touches[0].clientY - this.__positions.initialY;
                          } else {
                              if (this.__dragging) {
          Severity: Major
          Found in src/dynamics/_common/helperframe.js and 1 other location - About 2 hrs to fix
          src/dynamics/_common/helperframe.js on lines 270..280

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

          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 (ev.type === "touchstart") {
                                  this.__positions.initialX = ev.touches[0].clientX - this.__positions.xOffset;
                                  this.__positions.initialY = ev.touches[0].clientY - this.__positions.yOffset;
                              } else {
                                  if (this.__dragging) {
          Severity: Major
          Found in src/dynamics/_common/helperframe.js and 1 other location - About 2 hrs to fix
          src/dynamics/_common/helperframe.js on lines 308..324

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

          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.__dragging) {
                                      this.__positions.initialX = ev.clientX - this.__positions.xOffset;
                                      this.__positions.initialY = ev.clientY - this.__positions.yOffset;
                                  }
          Severity: Major
          Found in src/dynamics/_common/helperframe.js and 1 other location - About 1 hr to fix
          src/dynamics/_common/helperframe.js on lines 312..315

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

          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.__dragging) {
                                  this.__positions.currentX = ev.clientX - this.__positions.initialX;
                                  this.__positions.currentY = ev.clientY - this.__positions.initialY;
                              }
          Severity: Major
          Found in src/dynamics/_common/helperframe.js and 1 other location - About 1 hr to fix
          src/dynamics/_common/helperframe.js on lines 274..277

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

          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.__visibleDimensions.x = this.__translate.offsetX + this.get("framepositionx") * this.__translate.scale;
          Severity: Minor
          Found in src/dynamics/_common/helperframe.js and 1 other location - About 35 mins to fix
          src/dynamics/_common/helperframe.js on lines 191..191

          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

                              this.__visibleDimensions.y = this.__translate.offsetY + this.get("framepositiony") * this.__translate.scale;
          Severity: Minor
          Found in src/dynamics/_common/helperframe.js and 1 other location - About 35 mins to fix
          src/dynamics/_common/helperframe.js on lines 190..190

          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

          There are no issues that match your filters.

          Category
          Status