Added ResetOperation to fix IsOver() reporting #352
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to/adds functionality to fix #132, #133, #310.
I've been noticing the same issue as these previous reports, where IsOver() is reporting true even when I'm not drawing a gizmo:
gizmo.webm
I've added a low-footprint fix to errant IsOver() return values when stopping gizmo drawing and having the mouse cursor over the spot where the gizmo would have been drawn. The key issue is out-of-path logic that stops gizmo drawing, since IsOver() uses cached operation flags from the last Manipulate call to decide if the mouse is over a gizmo, whether it's being drawn or not.
Adding the capability to (re)set the operation flag allows for the correct result from IsOver() without needing to send a call through Manipulate just to reset the flag. There was a suggestion in the previous reports that users could track the gizmo drawing state and use that in conjunction with IsOver(), but I think it's useful to have a way to correct the cached operation flag.