Skip to content

Commit

Permalink
Reset detachment state when skater dragged, see #207
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Aug 29, 2014
1 parent 9f8f413 commit b578360
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/model/Skater.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ define( function( require ) {
this.angle = 0;
PropertySet.prototype.reset.call( this );
this.lastDetachment = this.getInitialDetachment();
this.startingLastDetachment = this.getInitialDetachment();
this.updateEnergy();
},

Expand Down
2 changes: 2 additions & 0 deletions js/view/SkaterNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ define( function( require ) {
skater.position = targetTrack.getPoint( targetU );
}

skater.lastDetachment = skater.getInitialDetachment();
skater.startingLastDetachment = skater.getInitialDetachment();
skater.updateEnergy();
skater.trigger( 'updated' );
},
Expand Down

0 comments on commit b578360

Please sign in to comment.