|
<EjsDiagram ID="diagram" Width="1000px" Height="@Height" @ref="@diagram" Nodes="@NodeCollection" Tool="DiagramTools.SingleSelect">
</EjsDiagram> |
|
<EjsDiagram ID="diagram" Width="1000px" Height="@Height" @ref="@diagram" Nodes="@NodeCollection" Tool="@tool">
<DiagramEvents SelectionChanged="@SelectionChange"></DiagramEvents>
</EjsDiagram>
@functions
{
public DiagramTools tool = DiagramTools.SingleSelect | DiagramTools.ZoomPan;
} |
|
public async Task OnClicked(IBlazorClickEventArgs args)
{
if (args.Element.Diagram != null && args.Element.Diagram.SelectedItems.Nodes != null)
{
await diagram.ClearSelection();
}
} |
Hi Manuel,By using the “click” event we can deselect the selected node in the diagram. If we click on the diagram click event gets fired. In that event, we can check if the diagram has selected items or not. If it has selected items means then we can clear the selection in the diagram.
public async Task OnClicked(IBlazorClickEventArgs args){if (args.Element.Diagram != null && args.Element.Diagram.SelectedItems.Nodes != null){await diagram.ClearSelection();}}Regards,Aravind Ravi