From 52eb818bf508b27cfdd07d94d48e70180c783c99 Mon Sep 17 00:00:00 2001 From: Luisav1 Date: Mon, 31 Oct 2022 12:34:07 -0600 Subject: [PATCH] Add TODOs to generalize dragEndedListener. See https://github.com/phetsims/build-a-nucleus/issues/61. --- js/decay/view/DecayScreenView.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/decay/view/DecayScreenView.ts b/js/decay/view/DecayScreenView.ts index cd59a33..5905a63 100644 --- a/js/decay/view/DecayScreenView.ts +++ b/js/decay/view/DecayScreenView.ts @@ -450,10 +450,12 @@ class DecayScreenView extends BANScreenView { /** * Define a function that will decide where to put nucleons. */ + // TODO: generalize this into BANScreenView protected override dragEndedListener( nucleon: Particle, atom: ParticleAtom ): void { const particleCreatorNodeCenter = nucleon.type === ParticleType.PROTON.name.toLowerCase() ? this.protonsCreatorNode.center : this.neutronsCreatorNode.center; + // TODO: pass in boolean here from subclass function if ( nucleon.positionProperty.value.distance( atom.positionProperty.value ) < NUCLEON_CAPTURE_RADIUS || // if removing the nucleon will create a nuclide that does not exist, re-add the nucleon to the atom