Conversation
| /// </summary> | ||
| /// <param name="e">A mouse event</param> | ||
| /// <returns>Whether the mouse is over the preview or not</returns> | ||
| private bool IsMouseInsidePreview(MouseEventArgs e) |
There was a problem hiding this comment.
How is this method different in functionality from the method with the similar name: IsMouseInsideNodeOrPreview? Does the latter method address the second point above: HitTest on NodeView => Anomalous region that skips right part of preview if larger than node, and is therefore an insufficient test?
There was a problem hiding this comment.
Yes, that's right @aparajit-pratap . I know it's kinda strange for a method summary, but why it was needed was hard to explain otherwise.
There was a problem hiding this comment.
do we know why the anomalous region exists? 😉 💀
|
Nice fix to have. This was quite frustrating. |
mjkkirschner
left a comment
There was a problem hiding this comment.
It looks good, are you still thinking of creating a test that raises leave events manually?
|
@mjkkirschner I haven't found a way to do that which would allow me to specify a position. Will search a little more tomorrow morning. |
|
Merging as we are doing a UI automation test for this |
Purpose
Fixes a bug which would make the preview hide even when the mouse was
moved over a visible part of it. This happened only when the preview
area was wider than the node.
The cause of the bug I would argue is some very strange behavior of
HitTest. When run on the NodeView, this test would not consider the
right part of the preview, like if the box was as wide as the node but
displaced to the left.
Likewise, running a HitTest on the PreviewControl itself provided
inconsistent results. Initially this would work as expected, but after
the preview was expanded and recondensed, the box would remain forever
bloated as if still expanded. This resulted in inconsistencies with the
leave event, which used the real margins of the control.
The problem was fixed by checking explicitly that the preview visible
area is abandoned before hiding the preview.
Declarations
Check these if you believe they are true
*.resxfilesReviewers
@QilongTang @mjkkirschner
FYIs
@DynamoDS/dynamo