phetsims / keplers-laws

"Kepler's Laws" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 1 forks source link

Uninstrument `secondLawScreen.view.panels.rightPanels.targetOrbitPanel` #227

Closed arouinfar closed 10 months ago

arouinfar commented 10 months ago

Discovered while writing examples.md for #223

The Target Orbit feature is only relevant for the first and third laws, but the panel appears in the tree on the Second Law screen: image

This feature was not designed to be used with the Second Law screen, so let's unintrument secondLawScreen.view.panels.rightPanels.targetOrbitPanel.

pixelzoom commented 10 months ago

In KeplersLawsPanel.ts, the 3rd argument needs to be conditional, so that it's Tandem.OPT_OUT for the Second Law:

    const targetOrbitPanel = new TargetOrbitPanel( model, topLayer, tandem.createTandem( 'targetOrbitPanel' ) );
arouinfar commented 10 months ago

Thanks @AgustinVallejo. I'm seeing targetOrbitPanelVisibleProperty instrumented for the Second Law screen, so I think you'll need to take care of that too.

AgustinVallejo commented 10 months ago

My bad, fixing

arouinfar commented 10 months ago

Thanks @AgustinVallejo, looks good on main, closing.