Skip to content

Nodes Break when moved to certain positions in local space #105

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

Closed
FapianoSWE opened this issue Mar 17, 2021 · 10 comments
Closed

Nodes Break when moved to certain positions in local space #105

FapianoSWE opened this issue Mar 17, 2021 · 10 comments

Comments

@FapianoSWE
Copy link

Hi, I have a really wierd problem. When nodes are moved out of or created outside a invisible wierd area of the local editor space they are no longer really interactable. They can only be selected with area selection. Pins are not interactable, they dont get tagged as HotObject when hovered. No connections can be made. it can be deleted and existing links it has can be selected and deleted aswell. In the gif below i try to demonstrate how the node breaks when moved.

Node Editor Bugg Demonstration

@FapianoSWE
Copy link
Author

I've done further testing and discovered that the problem only appears on nodes that have a position of approximately [x < 0, < > 1900] [y < 0, y > 1050]

It also appears that events for left mouse button arent listened to if the ViewPosition is approximately [x < -1423, x > 1760] and [y < -708, y > 990].

I believe that it's somehow a problem with resolution but haven't found any evidence to support that

@FapianoSWE
Copy link
Author

I have had another person try to replicate the issues with a ultra wide monitor and have had the same problems but with a much larger rectangle of approximately X:-165 to 5056 and Y: -80 to 1410. The problem appear too happen at the same percentage of your screen resolution. Is there anything in the code base that scales with screen resolution, I can't find anything that could cause this issue

@jdahl
Copy link

jdahl commented Mar 19, 2021

You might be in luck since I had this same issue as well but finally managed to track it down.
My issue was that I used the docking branch of dear imgui. However imgui node editor didn't work with it since I got compiler errors so I assumed I could just tell imgui to skip the viewport support because I didn't use it. I just used the docking support.
That assumption was wrong. After enabling support again using IMGUI_HAS_VIEWPORT and actually fixing the issue I got in the node editor it now works as expected.

The issue I got was the use of 2, now internal, properties. It could be fixed by casting to the internal viewport type ImGuiViewportP in imgui_canvas.cpp around line 360. Not sure if that's the right way though but seems to have worked.

@thedmd
Copy link
Owner

thedmd commented Jul 8, 2021

Does the issue affect you on master branch or develop one?

@FapianoSWE
Copy link
Author

If I remember correctly we used a merged version between master branch and docking

@thedmd
Copy link
Owner

thedmd commented Jul 8, 2021

Editor on develop will now play nicely with your local docking branch.
Are you able to drop in editor from develop to your sources and confirm if problem is solved or not?

@FapianoSWE
Copy link
Author

Unfortunately I don't have access to the source files anymore, due to the fact that it was tied to a school project. I really appreciate that you answered the issue and I'm sorry for being unable to verify the fix. I feel like this issue has been as solved as it can be and could be marked as such.

@thedmd
Copy link
Owner

thedmd commented Jul 11, 2021

Thanks for feedback. So far I didn't managed to reproduce the issue on develop branch. For the time being I consider it fixed.

@thedmd thedmd closed this as completed Jul 11, 2021
@nlapinski
Copy link

I can confirm using the latest develop imgui_canvas.cpp/h fixes this in the docking imgui node branch, and works correctly with the docking of imgui you have.

@Stanlyhalo
Copy link

I can confirm using the latest develop imgui_canvas.cpp/h fixes this in the docking imgui node branch, and works correctly with the docking of imgui you have.

This appears to not work for me, I'm using 1.83 docking branch, but I can't seem to fix this same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants