phetsims / natural-selection

"Natural Selection" is an educational simulation in HTML5, by PhET Interactive Simulations
GNU General Public License v3.0
3 stars 7 forks source link

Elements to make `phetioReadOnly: true` #344

Closed arouinfar closed 1 year ago

arouinfar commented 1 year ago

For #323

@pixelzoom I've identified a few elements that should be phetioReadOnly: true.

There is no need for the client to control these Properties:

In the Pedigree Graph, it's possible to hide the allele checkboxes, but leave behind the legend information, which seems odd.

image
pixelzoom commented 1 year ago

Done in the above commits. This was an API change, and required new migration rules.

For view.graphs.pedigreeNode.allelesPanel.*Row.checkbox.visibleProperty, I can think of no purpose to have this element if it's read-only; it will always be true. So rather than make it read-only, I unistrumented checkbox.visibleProperty. @arouinfar let me know if you had a purpose for it, and I can certainly make it read-only.

@arouinfar please review. Close OK.

arouinfar commented 1 year ago

I unistrumented checkbox.visibleProperty.

Good call, thanks @pixelzoom. The changes all look good, closing.