Open AgustinVallejo opened 1 year ago
Yes. In my opinion it is quite sad that sun buttons are so dependent on downProperty as their only tool to use. For sound, @jbphet noted this challenge and created a sound-specific solution for this called produceSoundEmitter
. In https://github.com/phetsims/sun/issues/701 (with linked side issues for specific components), I have had really great luck tying some logic to the interaction instead of the Property listener itself. That said I have never encountered a specific order dependency like this.
I'm happy to have more conversation with anyone that would like.
First noticed in https://github.com/phetsims/my-solar-system/issues/171, it seems that for
PushButtonModel
andButtonModel
, we're calling startCallback > endCallback > fire (which is when the actual number property changes). There was a Slack discussion with @jbphet @pixelzoom and @zepumph which stated potential solutions or workarounds.@jbphet:
@zepumph:
@pixelzoom: