Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set visibleProperty to read-only for some Nodes #106

Closed
pixelzoom opened this issue Feb 6, 2020 · 2 comments
Closed

set visibleProperty to read-only for some Nodes #106

pixelzoom opened this issue Feb 6, 2020 · 2 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 6, 2020

2/6/20 design meeting. From #92:

  • Visibility of several Nodes are controlled by an associated Property. (LinearGraph, LogarithmicGraph, RatioNode, MoleculesNode, PHMeterNode, others?) Should their visibleProperty be read-only so we can't get into trouble?

Yes, do this.

@pixelzoom
Copy link
Contributor Author

To make visibleProperty, pass this via options:

        phetioComponentOptions: {
          visibleProperty: {
            phetioReadOnly: true
          }
        }

@pixelzoom
Copy link
Contributor Author

I made the visibleProperty of the following elements read-only:

moleculeCountNode
ratioNode
linearGraphNode
logarithmicGraphNode
zoomInButton
zoomOutButton
``

I'm going to close this, since this is supposed to be a starting point.  A more comprehensive review will follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant