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

Hide ArrowNode if GraphIndicatorNode is not pickable #126

Closed
arouinfar opened this issue Mar 2, 2020 · 2 comments
Closed

Hide ArrowNode if GraphIndicatorNode is not pickable #126

arouinfar opened this issue Mar 2, 2020 · 2 comments

Comments

@arouinfar
Copy link
Contributor

For #117

On the My Solution Screen, the GraphIndicatorNode for H3O+ and OH- are interactive. They are decorated with a green arrow to cue the interactivity.

image

PhET-iO clients may choose to set the pickableProperty of indicatorH3ONode and/or indicatorOHNode to false to prevent users from changing the pH via the GraphIndicatorNodes. However, the green arrows remain which leads to a strange UX.

We don't want to instrument these ArrowNodes, but it would be nice if they could be hidden when the corresponding element isn't interactive. Would it be possible for the visibility of the ArrowNode to listen to the pickableProperty of the corresponding GraphIndicatorNode?

@pixelzoom
Copy link
Contributor

Done in the above commit. Reminder that pickableProperty is not boolean -- it can be true, false, or null. If it's true or null, then the arrows are visible; if it's false then the arrows are invisible.

@arouinfar please review in master.

@arouinfar
Copy link
Contributor Author

Reminder that pickableProperty is not boolean -- it can be true, false, or null. If it's true or null, then the arrows are visible; if it's false then the arrows are invisible.

Understood, thanks @pixelzoom. The behavior is looking good in master.

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

2 participants