creative-connections/Bodylight.js-Components

View on GitHub

Showing 430 of 684 total issues

Function start_ has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Dygraph.prototype.start_ = function() {
    var data = this.file_;

    // Functions can return references of all other types.
    if (typeof data == 'function') {
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

    Function resize has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Dygraph.prototype.resize = function(width, height) {
        if (this.resize_lock) {
            return;
        }
        this.resize_lock = true;
    Severity: Minor
    Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

      Function mouseMove_ has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Dygraph.prototype.mouseMove_ = function(event) {
          // This prevents JS errors when mousing over the canvas before data loads.
          var points = this.layout_.points;
          if (points === undefined) return;
      
      
      Severity: Minor
      Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

        Function footnoteInline has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function footnoteInline(state, silent) {
            let labelStart;
            let labelEnd;
            let footnoteId;
            let token;
        Severity: Minor
        Found in src_aurelia-bodylight-plugin/src/elements/markdown-it-bfootnote.js - About 1 hr to fix

          Function bind has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              bind() {
                this.divstyle = `width:${this.width};height:${this.height}; position:relative`;
                console.log('bind() moleculeId,hidecontrols,hidepolymer,moleculeidref', this.moleculeId, this.hideControls, this.hidePolymer, this.parentref);
                this.pdbref = document.createElement('pdbe-molstar');
                if (this.moleculeId) this.pdbref.setAttribute('molecule-id', this.moleculeId);
          Severity: Minor
          Found in src_aurelia-bodylight-plugin/src/elements/pdb-pdbe-molstar.js - About 1 hr to fix

            Function bind has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              bind() {
                //register throttled update function    
                if (typeof this.throttle === 'string') this.throttle = parseInt(this.throttle, 10);
                if (typeof this.tofixed === 'string') this.tofixed = parseInt(this.tofixed, 10);
                if (typeof this.dataevent === 'string') this.dataevent = this.dataevent === 'true';
            Severity: Minor
            Found in src_aurelia-bodylight-plugin/src/elements/value.js - About 1 hr to fix

              Function valueChanged has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  valueChanged(newValue, oldValue) {
                      //if (oldValue !== newValue)
                      if (this.ids) {
                          //semaphore only one change in time is allowed
                          if (!window.rangebinding) {
              Severity: Minor
              Found in src_aurelia-bodylight-plugin/src/elements/range.js - About 1 hr to fix

                Function bind has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  bind() {
                    //console.log('bdlmarkdownnav src:', this.src);
                    if (this.notinitread && this.src && this.src.length > 0 && this.mdtoc) this.fetchMDSrc();
                    //bind navigation first - get src before content - to solve navigation hide open issue at the beginning
                    //console.log('bdlmakrdownnav src:', this.src);
                Severity: Minor
                Found in src_aurelia-bodylight-plugin/src/elements/markdownnav.js - About 1 hr to fix

                  Function abbr_def has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function abbr_def(state, startLine, endLine, silent) {
                      var label, title, ch, labelStart, labelEnd,
                          pos = state.bMarks[startLine] + state.tShift[startLine],
                          max = state.eMarks[startLine];
                  
                  
                  Severity: Minor
                  Found in src_aurelia-bodylight-plugin/src/elements/markdown-it-abbr-ext.js - About 1 hr to fix

                    Function DygraphCanvasRenderer has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var DygraphCanvasRenderer = function(dygraph, element, elementContext, layout) {
                        this.dygraph_ = dygraph;
                    
                        this.layout = layout;
                        this.element = element;
                    Severity: Minor
                    Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

                      Function extremeValues_ has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Dygraph.prototype.extremeValues_ = function(series) {
                          var minY = null, maxY = null, j, y;
                      
                          var bars = this.attr_("errorBars") || this.attr_("customBars");
                          if (bars) {
                      Severity: Minor
                      Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

                        Function bind has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          bind() {
                            this.refindex = parseInt(this.refindex, 10);
                            this.refvalues = parseInt(this.refvalues, 10);
                            this.refendindex = this.refindex + this.refvalues;
                        
                        
                        Severity: Minor
                        Found in src_aurelia-bodylight-plugin/src/elements/plotly.js - About 1 hr to fix

                          Function constructor has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              constructor() {
                                this.handleTick = e => {
                                  this.currenttick++;
                                  if (this.currenttick >= this.ticks2reset) {
                                    //do reset values
                          Severity: Minor
                          Found in src_aurelia-bodylight-plugin/src/elements/buttonparams.js - About 1 hr to fix

                            Function bind has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              bind() {
                                this.isOneshot = this.mode === 'oneshot';
                                this.isOnestep = this.mode === 'onestep';
                                if (this.isOnestep) {
                                  this.showcontrols = false;
                            Severity: Minor
                            Found in src_aurelia-bodylight-plugin/src/elements/fmi.js - About 1 hr to fix

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

                              export function configure(aurelia) {
                                  aurelia.use
                                      .standardConfiguration()
                                      //all components from src (resources/index) will be registered as web component
                                      .plugin(PLATFORM.moduleName('aurelia-bodylight-plugin'))
                              Severity: Minor
                              Found in src_webcomponents/webcomponents.js - About 1 hr to fix

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

                                Dygraph.prototype.updateOptions = function(input_attrs, block_redraw) {
                                    if (typeof(block_redraw) == 'undefined') block_redraw = false;
                                
                                    // mapLegacyOptions_ drops the "file" parameter as a convenience to us.
                                    var file = input_attrs.file;
                                Severity: Minor
                                Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

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

                                              underlayCallback: function (canvas, area, g) {
                                                  //draw area of limit borders
                                                  //console.log("gradients [0][0..2]:" + g.toDomXCoord(gradient[0][0]) + " " + g.toDomXCoord(gradient[0][1]) + " " + g.toDomXCoord(gradient[0][2]));
                                                  if (isNaN(g.toDomXCoord(gradient[0][0]))) {
                                                      console.log("cannot draw gradients [0][0..2]:" + g.toDomXCoord(gradient[0][0]) + " " + g.toDomXCoord(gradient[0][1]) + " " + g.toDomXCoord(gradient[0][2]));
                                  Severity: Minor
                                  Found in src_aurelia-bodylight-plugin/src/elements/sachart.js - About 1 hr to fix

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

                                        constructor() {
                                            super();
                                            this.handleXData  = e => {
                                                window.refpoint = e.target.value;
                                                this.updatechart();
                                    Severity: Minor
                                    Found in src_aurelia-bodylight-plugin/src/elements/chartjs-time.js - About 1 hr to fix

                                      Function _drawStyledLine has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          ctx, i, setName, color, strokeWidth, strokePattern, drawPoints,
                                          drawPointCallback, pointSize) {
                                      Severity: Major
                                      Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

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

                                            bind() {
                                              super.bind();
                                              if (this.type && this.type.startsWith('on.')) {
                                                this.expand = true;
                                                this.type = this.type.substring(3)
                                        Severity: Minor
                                        Found in src_aurelia-bodylight-plugin/src/elements/markdown-book2.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language