phetsims / build-an-atom

"Build an Atom" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/build-an-atom
GNU General Public License v3.0
11 stars 10 forks source link

Picking up particles while they animate back to buckets is broken #169

Closed jessegreenberg closed 7 years ago

jessegreenberg commented 7 years ago

For https://github.com/phetsims/QA/issues/23

jessegreenberg commented 7 years ago

Could be caused by recent scenery changes, but a recent commit also changed the drag handler https://github.com/phetsims/shred/commit/1cb8069c15b3575479ce493ff303c06d4a328b6a

jessegreenberg commented 7 years ago

Prior to that commit, the translate listener looked like

      translate: function( translationParams ) {
        particle.setPositionAndDestination(
          particle.positionProperty.get().plus( modelViewTransform.viewToModelDelta( translationParams.delta ) )
        );
        return translationParams.position;
      },

The new onDrag looks like

     onDrag: function( event, trail ) {
        // update the position immediately to match the destination (i.e. don't animate)
        self.particle.moveImmediatelyToDestination();
      },
jessegreenberg commented 7 years ago

And if I revert shred to https://github.com/phetsims/shred/commit/55239bb58bd58330f6dedefa662fd8c630b8ed98 the problem goes away.

jessegreenberg commented 7 years ago

@jbphet volunteered to investigate this, thanks!

jbphet commented 7 years ago

Should be fixed by this commit to shred: https://github.com/phetsims/shred/commit/820bea9729ef5f5e8bd90e0de790ca3d1abf0645

Assigning to @jessegreenberg to pull into the RC that is in progress for this sim.

jessegreenberg commented 7 years ago

I updated the shred SHA for the 1.6 release, thanks @jbphet.

jessegreenberg commented 7 years ago

1.6 was deployed and this issue can be closed.