-
Notifications
You must be signed in to change notification settings - Fork 12
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
enabledProperty should run on inputEnabled instead of pickable #1175
Comments
@jonathanolson and I used the snapshot comparison tool and compared master (including all the changes from the end of #1116) with this patch: Index: js/SunConstants.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/SunConstants.js b/js/SunConstants.js
--- a/js/SunConstants.js (revision a3b580915543874ffe99a2cb55c8d64f8761cb84)
+++ b/js/SunConstants.js (date 1615584957091)
@@ -40,7 +40,7 @@
disabledOpacity: SunConstants.DISABLED_OPACITY
}, options );
- node.pickable = enabled;
+ node.inputEnabled = enabled;
node.opacity = enabled ? 1.0 : options.disabledOpacity;
}
};
Index: js/buttons/ButtonNode.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/buttons/ButtonNode.js b/js/buttons/ButtonNode.js
--- a/js/buttons/ButtonNode.js (revision a3b580915543874ffe99a2cb55c8d64f8761cb84)
+++ b/js/buttons/ButtonNode.js (date 1615584957086)
@@ -85,8 +85,7 @@
enabledAppearanceStrategy: ( enabled, button, background, content ) => {
background.filters = enabled ? [] : [ CONTRAST_FILTER, BRIGHTNESS_FILTER ];
- // TODO: this is a workaround until we can use Node.interactive, see https://github.com/phetsims/scenery/issues/1116
- button.pickable = enabled ? null : false;
+ button.inputEnabled = enabled;
if ( content ) {
content.filters = enabled ? [] : [ Grayscale.FULL ];
There were a good number of cases that changed (yay! the tool works). They seem to all be reasonable and acceptable improvements, and not regressions. I'll explain each one:
For investigating Friction, I tried the following:
I couldn't find anything substantive, for Friction. I'm going to commit. |
@jonathanolson, can you think of why friction would be showing these differences? Also please review in general. |
Review in general is good! I looked more into Friction, and I'm not precisely sure. Since it seems to be operating fine, I don't have enough concerns to continue diving into why there was a potential change. Looks good, closing! |
With #1116 now complete, such that inputEnabled supports dynamic toggling with proper enter/exit events with scenery input, we are ready to flip the switch in our enabledAppearanceStrategies. There are two spots for this:
SunConstants.componentEnabledListener
and in ButtonNode's defaultenabledAppearanceStrategy
option.The text was updated successfully, but these errors were encountered: