miroiu / nodify

Highly performant and modular controls for node-based editors designed for data-binding and MVVM.
https://miroiu.github.io/nodify
MIT License
1.27k stars 205 forks source link

[Bug] Changing BorderThickness will cause an exception to be displayed when nodes are selected #70

Open MakesYT opened 12 months ago

MakesYT commented 12 months ago

Describe the bug If BorderThickness is changed to a value not equal to 1, it will cause an abnormal display when the node is selected. If it is selected, the node will move slightly Modifying BorderBrush will cause SelectedBrush to be modified together and the SelectedBrush modifications to be invalid It is also not possible to change the Selected BorderThickness To Reproduce change ItemContainer style

Expected behavior No displacement

Screenshots image image

Additional context Add any other context about the problem here.

miroiu commented 11 months ago

Hi, I created a PR for this. Can you please check it out and let me know if that's what you expected? Thanks!

MakesYT commented 11 months ago

the PR is working

MakesYT commented 11 months ago

Another question Modifying BorderBrush will cause SelectedBrush to be modified at the same time, which will cause the SelectedBrush modification to be invalid

MakesYT commented 11 months ago

like this image SelectedBrush modification is invalid

One idea is to modify SelectedBrush synchronously when only BorderBrush is modified, but when SelectedBrush is manually specified, the manually specified SelectedBrush will prevail

miroiu commented 11 months ago

I merged the fix for border thickness and I replicated the selected brush issue, but I don't understand why it doesn't work as expected.

miroiu commented 9 months ago

Let me know if anyone wants to give it a try.