-
Notifications
You must be signed in to change notification settings - Fork 2
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
Multi-input: Assertion failed: The shape of the Node highlight should be set by now. Does it have bounds? #369
Comments
Agreed! Maybe we can convince @jessegreenberg that this patch is ok, and that you can show an invisible highlight when the shape is null. This will solve our race condition. Let's ask. Can we commit this? I was able to fuzz for 5 minutes and then I hit #390 instead of this error. Subject: [PATCH] better autoselect behavior for Mass.ts, https://github.com/phetsims/density-buoyancy-common/issues/387
---
Index: js/overlays/HighlightOverlay.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/overlays/HighlightOverlay.ts b/js/overlays/HighlightOverlay.ts
--- a/js/overlays/HighlightOverlay.ts (revision 03648177f22989f7ee79ab3342a06f4a719e4be7)
+++ b/js/overlays/HighlightOverlay.ts (date 1725576535650)
@@ -315,10 +315,7 @@
// if using a focus highlight from another node, we will track that node's transform instead of the focused node
if ( highlight instanceof HighlightPath ) {
- const highlightPath = highlight;
- assert && assert( highlight.shape !== null, 'The shape of the Node highlight should be set by now. Does it have bounds?' );
-
- if ( highlightPath.transformSourceNode ) {
+ if ( highlight.transformSourceNode ) {
trailToTrack = highlight.getUniqueHighlightTrail( this.trail );
}
} |
The commit message for the added assertion indicates this was used to help track down another problem that has since been fixed so I am fine removing this. phetsims/scenery@b7099c1. |
Signed-off-by: Michael Kauzmann <michael.kauzmann@colorado.edu>
This is helpful in understanding the highlight system thanks. While reviewing the commit again I realized that this was also showing an improvement that we could make to MassView as well, so there is no |
Looks great, thanks, closing. |
I can trigger this error with
brand=phet-io&phetioStandalone&ea&debugger&preferencesStorage&fuzz&fuzzBoard&disableModals
.This is most likely because we focus something before we have set the shape for the focusHighlight from an empty shape.
This is likely the troubled area:
density-buoyancy-common/js/common/view/MassView.ts
Lines 114 to 119 in 1442534
We may decide to not fix this since it is about mouse/keyboard combined input, but I thought I'd log it.
The text was updated successfully, but these errors were encountered: