Skip to content

Commit

Permalink
#56 rename _updateFitBinded into _updateFitBound
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-zelenkov committed Aug 30, 2015
1 parent d2020e1 commit 7dd9fe0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions js/curve-fitting/model/Curve.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ define( function( require ) {
// special object to getting fit for points
this.fitMaker = new FitMaker( maxFitOrder );

this._updateFitBinded = this.updateFit.bind( this );
this._updateFitBound = this.updateFit.bind( this );

this.points.addListeners( this.addPoint.bind( this ), this.removePoint.bind( this ) );

Expand Down Expand Up @@ -92,21 +92,21 @@ define( function( require ) {
// remove update listeners for parameters
if ( fitTypePrev === FitType.ADJUSTABLE ) {
self.saveValuesToStorage();
self.aProperty.unlink( self._updateFitBinded );
self.bProperty.unlink( self._updateFitBinded );
self.cProperty.unlink( self._updateFitBinded );
self.dProperty.unlink( self._updateFitBinded );
self.aProperty.unlink( self._updateFitBound );
self.bProperty.unlink( self._updateFitBound );
self.cProperty.unlink( self._updateFitBound );
self.dProperty.unlink( self._updateFitBound );
}

self.updateFit();
self.updateCurveTrigger = !self.updateCurveTrigger;
}
else if ( fitTypeNew === FitType.ADJUSTABLE ) {
// add update listeners for parameters
self.aProperty.lazyLink( self._updateFitBinded );
self.bProperty.lazyLink( self._updateFitBinded );
self.cProperty.lazyLink( self._updateFitBinded );
self.dProperty.lazyLink( self._updateFitBinded );
self.aProperty.lazyLink( self._updateFitBound );
self.bProperty.lazyLink( self._updateFitBound );
self.cProperty.lazyLink( self._updateFitBound );
self.dProperty.lazyLink( self._updateFitBound );
self.restoreValuesFromStorage();

self.updateCurveTrigger = !self.updateCurveTrigger;
Expand Down Expand Up @@ -196,8 +196,8 @@ define( function( require ) {

// add point to curve
addPoint: function( point ) {
point.positionProperty.lazyLink( this._updateFitBinded );
point.deltaProperty.link( this._updateFitBinded );
point.positionProperty.lazyLink( this._updateFitBound );
point.deltaProperty.link( this._updateFitBound );
},

// return deviation sum for all points
Expand Down Expand Up @@ -231,8 +231,8 @@ define( function( require ) {

// remove point from curve
removePoint: function( point ) {
point.positionProperty.unlink( this._updateFitBinded );
point.deltaProperty.unlink( this._updateFitBinded );
point.positionProperty.unlink( this._updateFitBound );
point.deltaProperty.unlink( this._updateFitBound );
this.updateFit();
},

Expand Down

0 comments on commit 7dd9fe0

Please sign in to comment.