Closed megan-phet closed 6 years ago
This is not in the published version of the sim, and could have been introduced in changes for #417
Comparing diffs, I don't see how change for #417 could cause this. I verifed that updateTrackShape
is being called on drag end. Comparing against deployed version 1.1, that version used Events, and is updating track shape on 'reset', 'smothed', and 'updated'. I see that TrackNode is now adding listeners to Emitters for these events, perhaps we are missing an emit() call?
By comparison to 1.1 branch, I am not seeing any missing emit calls. It is working correctly when dragging ControlPointNodes, maybe Ill have better finding what the difference is between track and control point dragging currently.
Also, it looks like this bit of code in TrackNode should be handling exactly this issue:
track.draggingProperty.link( function( dragging ) {
if ( !dragging ) {
self.updateTrackShape();
}
} );
Oh, draggingProperty
is not being updated when the track is dragged.
I added this to TrackDragListener on end and it seemed to fix the problem.
// notify listeners that the track is no longer being dragged
track.draggingProperty.value = false;
Was something like this in 1.1?
Sort of, used to be this:
track.dragging = false;
This may have been introduced in the Property->PropertySet refactor? Anyway, I think this should be fixed. @megan-phet could you please check on phettest?
@jessegreenberg, on the version in master, there are no tracks.
Uh oh! Thanks for letting me know.
Sorry about that @megan-phet, master should no longer have that problem. Back to you.
Just took a look at this, and it seems to be fixed in master.
Thanks for verifying @KatieWoe. Closing this issue.
Test device:
Operating System:
Browser:
Problem description:
For phetsims/QA#134. After repositioning a smooth track the jagged edges will reappear.
Steps to reproduce:
Screenshots:
video
Troubleshooting information (do not edit):