Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a lot of extra white space that should be removed #30

Closed
jbphet opened this issue Dec 3, 2014 · 1 comment
Closed

There is a lot of extra white space that should be removed #30

jbphet opened this issue Dec 3, 2014 · 1 comment
Assignees

Comments

@jbphet
Copy link
Contributor

jbphet commented Dec 3, 2014

I'm coming across a lot of code during the review (see #29) that includes extra blank lines. I've been removing a lot if it as I go through the code, but It would be good to make a pass through and clean this up all at once. In general, this is undesirable because it limits the amount of code that can be seen on the screen at once time without adding any additional readability.

Here's an example from NeuronModel.js:

  // Delay between the values in the HH model to the concentration readouts.
  // This is needed to make sure that the concentration readouts don't
  // change before visible potassium or sodium ions have crossed the
  //membrane.
  var CONCENTRATION_READOUT_DELAY = 0.001;  // In seconds of sim time.


  // Thresholds for determining whether an action potential should be
  // considered to be in progress.  These values relate to the rate of flow
  // through the gated sodium, gated potassium, and combination of the
  // sodium and potassium leakage.  If the values from the HH model exceed
  // any of these, and action potential is considered to be in progress.
  // The values were determined empirically, and different HH models may
  // require different values here.
  var POTASSIUM_CURRENT_THRESH_FOR_ACTION_POTENTIAL = 0.001;
  var SODIUM_CURRENT_THRESH_FOR_ACTION_POTENTIAL = 0.001;
  var LEAKAGE_CURRENT_THRESH_FOR_ACTION_POTENTIAL = 0.444;


  // Rates at which concentration changes during action potential.  These
@jbphet
Copy link
Contributor Author

jbphet commented Dec 3, 2014

Another example from MembranePotentialChart.js:

    //horizontal grid lines
    for ( i = 0; i < numHorizontalGridLines + 1; i++ ) {
      line = new Line( 0, i * chartDimension.height / numHorizontalGridLines, chartDimension.width, i * chartDimension.height / numHorizontalGridLines, {stroke: 'gray', lineWidth: lineWidth} );
      line.computeShapeBounds = computeShapeBounds;
      plotGrid.addChild( line );
      plotGrid.addChild( new Text( rangeMap( i ), {font: GRID_TICK_TEXT_FONT, centerY: line.centerY, right: line.left - 6} ) );

    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants