-
Notifications
You must be signed in to change notification settings - Fork 4
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
InvertedBooleanProperty should not be settable, or should have 2-way binding #111
Comments
I hadn't thought about it much at all, I just wanted it and whipped it up quickly. It's a good point that it can be set independently, which is undesirable. I've revised it to use the DerivedProperty approach described above, and this makes it very compact. Good suggestion @samreid. Good to go? Do we need to think about passing in a tandem or options? |
I recommend passing through |
Options added. Are we done here? |
The options look great, I just added one improvement to the JSDoc. The last thing is it seems this belongs in axon--nothing about it seems tambo specific (except that tambo may use it). Finally, I noticed the definitions of |
That seems great, I didn't realize it was an option. I went with it, please review and close if you're good with it. |
Looks great, thanks! Closing. |
During phetsims/wave-interference#426 it was recommended to use InvertedBooleanProperty. I discovered there is a problem that you can set its value independently.
Have you considered implementing InvertedBooleanProperty using DynamicProperty, which supports one-way or two-way binding?
Have you considered implementing InvertedBooleanProperty as a DerivedProperty, like:
The text was updated successfully, but these errors were encountered: