Closed jchown closed 1 year ago
Hello, which version are you using?
I'm using v2.1.6
Amd how do you set the Locked property?
I lock/unlock the entire diagram:
private void SetLocked(bool locked)
{
foreach (var node in diagram.Nodes)
{
node.Locked = locked;
foreach (var port in node.Ports)
port.Locked = locked;
}
foreach (var link in diagram.Nodes)
link.Locked = locked;
}
Please add a call to Node.Refresh()
at the end in order to refresh the UI
Aha! Yes, that fixed it. Many thanks!
On my nodes which have a variable number of inputs, I have an "empty" port ready to receive a new connection.
I'd like to hide these ports when they aren't used - i.e. when the diagram is locked.
I tried something like
<div hidden="@(port.HideIfLocked && Node.Locked)">
around the PortRenderer in my node component, but it doesn't respond toLocked
change states.I appreciate that this may be a lack of understanding of Blazor rather than your library, but I can't see what the difference is between the Locked property and any other?