Closed arouinfar closed 2 years ago
Although a very similar problem to https://github.com/phetsims/ph-scale/issues/102, I ended up solving it differently because BackgroundNode, which houses the flatirons image, had no PhET-iO instrumentation at all. Instead of making that overly complicated, I just added a single Property to the screen view to be able to toggle whether or not the flat irons can be shown.
projectileMotion.dragScreen.view.flatIronsVisibleProperty
I don't love the name currently, and with it was something more like flatIronsCanBeVisibleProperty
, but I'm happy to leave it in semi-precedence with how https://github.com/phetsims/ph-scale/issues/102 was (with two visibleProperties that had to align for it to be visible).
Please review.
The new property is behaving well, thanks! Two tweaks:
flatironsVisibleProperty
.Done
Thanks @zepumph. Looks good in master, closing.
For #244
When the altitude is 1500-1700m, an image of the Flatirons appears (Drag & Lab screens). Clients may want to remove this easter egg, so it needs to be instrumented. We probably can't just slap a
visibleProperty
on it because the model needs to be in control of its visibility.This seems somewhat parallel to
phScale.macroScreen.view.neutralIndicatorNode
which was handled by wrapping it in another Node that the client can hide, see https://github.com/phetsims/ph-scale/issues/102.