The particle's y position is offset to a higher position when the arrows are used or when a particle is automatically returned back to the stack. This doesn't happen with dragging or ending a drag. See example below.
@marlitas and I noticed this bug appears when the returnParticleToStack() and createParticleFromStack() functions are used. The two functions use the following lines in BANScreenView to determine the creator node center from where to create or return particles.
We recently changed the ModelViewTransform so that it's passed in individually through its child classes since ChartIntroScreenView and DecayScreenView use different MVTs. See https://github.com/phetsims/build-a-nucleus/commit/77930227f9fcf89289169d0cf52db2c7e5157db7.
In comparing the original MVT in BANScreenView to the MVT currently in DecayScreenView, we didn't notice any difference.
We noticed this bug when we were fixing the MVT's in ChartIntroScreenView so we rollbacked those changes, which were never committed.
We logged the MVT used for each model in BANScreenView which confirmed to us that the correct MVT below is being used in DecayScreenView.
const modelViewTransform = ModelViewTransform2.createSinglePointScaleMapping(
Vector2.ZERO,
new Vector2( BANConstants.SCREEN_VIEW_ATOM_CENTER_X, BANConstants.SCREEN_VIEW_ATOM_CENTER_Y ), // the center of the atom node
1.0 );
We may have shifted things but are unsure of the best way to keep moving forward in debugging.
The particle's y position is offset to a higher position when the arrows are used or when a particle is automatically returned back to the stack. This doesn't happen with dragging or ending a drag. See example below.
@marlitas and I noticed this bug appears when the
returnParticleToStack()
andcreateParticleFromStack()
functions are used. The two functions use the following lines inBANScreenView
to determine the creator node center from where to create or return particles.We recently changed the ModelViewTransform so that it's passed in individually through its child classes since
ChartIntroScreenView
andDecayScreenView
use different MVTs. See https://github.com/phetsims/build-a-nucleus/commit/77930227f9fcf89289169d0cf52db2c7e5157db7. In comparing the original MVT inBANScreenView
to the MVT currently inDecayScreenView
, we didn't notice any difference.We noticed this bug when we were fixing the MVT's in
ChartIntroScreenView
so we rollbacked those changes, which were never committed. We logged the MVT used for each model inBANScreenView
which confirmed to us that the correct MVT below is being used inDecayScreenView
.We may have shifted things but are unsure of the best way to keep moving forward in debugging.