-
Notifications
You must be signed in to change notification settings - Fork 667
Fix autocomplete popup - #3 #11224
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
Fix autocomplete popup - #3 #11224
Changes from all commits
edd7bac
80e8bcd
7e61f8e
257e9d7
6250818
b8afb43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -563,6 +563,9 @@ public double Y | |
| } | ||
| } | ||
|
|
||
| internal double ActualHeight { get; set; } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious, can you explain why these were needed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These were needed to get the exact height and width from the node view and exposed to the portviewmodel via the nodeviewmodel. The width and height are needed to compute the popup placement positioning. |
||
| internal double ActualWidth { get; set; } | ||
|
|
||
| #endregion | ||
|
|
||
| #region events | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,10 +16,12 @@ | |
| using Dynamo.Graph.Nodes; | ||
| using Dynamo.Graph.Notes; | ||
| using Dynamo.Graph.Workspaces; | ||
| using Dynamo.Logging; | ||
| using Dynamo.Models; | ||
| using Dynamo.Search.SearchElements; | ||
| using Dynamo.Selection; | ||
| using Dynamo.UI; | ||
| using Dynamo.UI.Controls; | ||
| using Dynamo.Utilities; | ||
| using Dynamo.ViewModels; | ||
| using Dynamo.Wpf.UI; | ||
|
|
@@ -186,7 +188,16 @@ private void ShowHidePopup(ShowHideFlags flag, Popup popup) | |
| break; | ||
| case ShowHideFlags.Show: | ||
| // Show InCanvas search just in case, when mouse is over workspace. | ||
| popup.IsOpen = DynamoModel.IsTestMode || IsMouseOver; | ||
| var displayPopup = DynamoModel.IsTestMode || IsMouseOver; | ||
| if (displayPopup && popup == NodeAutoCompleteSearchBar) | ||
| { | ||
| if (ViewModel.NodeAutoCompleteSearchViewModel.PortViewModel == null) return; | ||
|
|
||
| ViewModel.NodeAutoCompleteSearchViewModel.PortViewModel.SetupNodeAutocompleteWindowPlacement(popup); | ||
| } | ||
| popup.IsOpen = displayPopup; | ||
| popup.CustomPopupPlacementCallback = null; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a must have or just sanity cleanup?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, otherwise the |
||
|
|
||
| ViewModel.InCanvasSearchViewModel.SearchText = string.Empty; | ||
| ViewModel.InCanvasSearchViewModel.InCanvasSearchPosition = inCanvasSearchPosition; | ||
| break; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.