Skip to content

Commit

Permalink
doc #316
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 24, 2023
1 parent ecb058f commit af01b9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/common/view/GraphSetsAnimator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default class GraphSetsAnimator {
this.fadeInAnimation && this.fadeInAnimation.stop();
this.translationAnimation && this.translationAnimation.stop();

// Compute positions for GraphNodes in the new set.
// Compute positions for GraphNodes in the new set. They are in top-to-bottom order.
const x = newGraphNodes[ 0 ].x;
const yEndCoordinates = [ 0 ];
for ( let i = 1; i < newGraphNodes.length; i++ ) {
Expand All @@ -98,6 +98,8 @@ export default class GraphSetsAnimator {
// there are no old GraphNodes, an animation was in progress, or we're restoring PhET-iO state.
if ( !oldGraphNodes || this.activeAnimation || phet.joist.sim.isSettingPhetioStateProperty.value ) {

console.log( `NOT animating ${Date.now()}` );

this.activeAnimation = null;

// Add the new set of GraphNodes to the scene graph.
Expand All @@ -111,6 +113,7 @@ export default class GraphSetsAnimator {
}
}
else {
console.log( `animating ${Date.now()}` );

//------------------------------------------------------------------------------------------------------------
// Fade out GraphNodes that are being added (in oldGraphNodes, but not in newGraphNodes).
Expand Down

0 comments on commit af01b9f

Please sign in to comment.