diff --git a/js/common/view/BANScreenView.ts b/js/common/view/BANScreenView.ts index 9e78155..b2e7886 100644 --- a/js/common/view/BANScreenView.ts +++ b/js/common/view/BANScreenView.ts @@ -192,7 +192,7 @@ abstract class BANScreenView> if ( particleType === ParticleType.PROTON || particleType === ParticleType.NEUTRON ) { // called when a nucleon is finished being dragged - particle.dragEndedEmitter.addListener( () => { this.dragEndedListener( particle, this.model.particleAtom ); } ); + particle.dragEndedEmitter.addListener( () => this.dragEndedListener( particle, this.model.particleAtom ) ); this.checkIfCreatorNodeShouldBeInvisible( particleType ); } diff --git a/js/common/view/NucleonArrowButtons.ts b/js/common/view/NucleonArrowButtons.ts index 99a0e0f..ca411c2 100644 --- a/js/common/view/NucleonArrowButtons.ts +++ b/js/common/view/NucleonArrowButtons.ts @@ -65,11 +65,11 @@ class NucleonArrowButtons extends Node { const neutronNumber = atomNeutronNumber + incomingNeutronsNumber + userControlledNeutronNumber; const userControlledNucleonNumber = userControlledNeutronNumber + userControlledProtonNumber; const doesNuclideExist = AtomIdentifier.doesExist( protonNumber, neutronNumber ); + const massNumber = atomProtonNumber + atomNeutronNumber; // Disable all buttons if the nuclide doesn't exist and one of the two cases: // Something is being user controlled OR Particle Atom is not empty - if ( !doesNuclideExist && - ( model.particleAtom.massNumberProperty.value !== 0 || userControlledNucleonNumber !== 0 ) ) { + if ( !doesNuclideExist && ( massNumber !== 0 || userControlledNucleonNumber !== 0 ) ) { // disable all arrow buttons if the nuclide does not exist NucleonArrowButtons.toggleCreatorNodeEnabled( protonsCreatorNode, false );