mgcrea/angular-strap

View on GitHub
src/affix/affix.js

Summary

Maintainability
D
1 day
Test Coverage

Function $get has 144 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.$get = function ($window, debounce, dimensions) {

      var documentEl = angular.element($window.document);
      var windowEl = angular.element($window);

Severity: Major
Found in src/affix/affix.js - About 5 hrs to fix

Function AffixFactory has 139 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function AffixFactory (element, config) {

        var $affix = {};

        // Common vars
Severity: Major
Found in src/affix/affix.js - About 5 hrs to fix

Function checkPosition has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        $affix.checkPosition = function () {
          // if (!this.$element.is(':visible')) return

          var scrollTop = getScrollTop();
          var position = dimensions.offset(element[0]);
Severity: Minor
Found in src/affix/affix.js - About 1 hr to fix

Function $parseOffsets has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        $affix.$parseOffsets = function () {
          var initialPosition = element[0].style.position;
          var initialTop = element[0].style.top;
          // Reset position to calculate correct offsetTop
          if (options.inlineStyles) {
Severity: Minor
Found in src/affix/affix.js - About 1 hr to fix

There are no issues that match your filters.

Category
Status