-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
[Bug] Nodes cannot be moved with the mouse in version 7.0.0 #199
Comments
Hi, I tested this what you said and I can not reproduce your problems. I created a new .Net8.0 project, added Nodify 7.0.0, copied your code and let it run on the same type of system you mentioned (Win 11, Visual Studio 2022) and it worked as expected. See the attached video: 2025-01-10.17-28-07.mp4Are there maybe other circumstances, which lead to this behavior? |
I tested the same thing and could not reproduce it. Did you customize any gesture or did you change the |
Thank you for your swift response and tested!! See the attached video. IssueNodifyMove2025-01-11.mp4
Not custmize any gesture and not change the Has the operation method changed in ver7.0.0 from ver6.6.0? If there is anything I can do please say so! |
Can you try the following code and let me know what's written in the output window? And is it only the public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
static MainWindow()
{
InputProcessor.Shared<ItemContainer>.RegisterHandlerFactory(editor => new CustomInputHandler());
}
private class CustomInputHandler : IInputHandler
{
public bool RequiresInputCapture => false;
public void HandleEvent(InputEventArgs e)
{
if (e.RoutedEvent != MouseMoveEvent)
{
Debug.WriteLine(e.RoutedEvent.Name);
}
}
}
} |
I encountered a similar problem, which did not occur on the old version either. When the Nodify Editor loses focus, such as opening a file dialog box, it cannot capture the
|
@miroiu
I also tested with Node, GroupingNode, and KnotNode, but similarly, Node does not move. |
@axionl I'll try to reproduce your issue whenever I have time. It would be very helpful if you could provide a minimal code example that demonstrates the problem. @shiguHa I believe the issue is related to the mouse not being captured for some reason. I’ve created a PR with a potential fix for this. Would you be able to test the fix in the |
@miroiu I modified the code as shown below, and now the node moves with drag. Before: nodify/Nodify/Containers/States/Default.cs Lines 45 to 49 in bc01626
After: EditorGestures.ItemContainerGestures gestures = EditorGestures.Mappings.ItemContainer;
if (true)
{
_isDragging = Element.IsDraggable;
} It seems that I also checked the Matches method of Nodify.Interactivity.InputGestureRef, but since I don't have a full understanding of the entire code, I couldn't identify the cause. I apologize if I’m saying something off the mark. |
It's the nodify/Nodify/Interactivity/Gestures/MouseGesture.cs Lines 72 to 90 in 13f75c2
|
Describe the bug
When using version 7.0.0 nodes cannot be moved with the mouse. This issue does not occur in version 6.6.0, where nodes can be moved as expected.
To Reproduce
Nodeify
library to your WPF .Net8 project. (not installed other libraries)NodifyEditor
and so.https://github.com/miroiu/nodify/wiki/Nodes-Overview
Expected behavior
The node should be draggable and movable with the mouse.
Additional context
This issue does not occur in version 6.6.0, where nodes can be moved as expected.
Environment
Nodify
Version: 7.0.0The text was updated successfully, but these errors were encountered: