Skip to content

Commit 64bb3af

Browse files
committed
1006428: updated sample
1 parent 3ce222d commit 64bb3af

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

Diagram/Server/Pages/DrawingTools/ToolSelection.razor

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22

33
@using Syncfusion.Blazor.Diagram
44

5-
<SfDiagramComponent Connectors="@_connectors" Height="600px" InteractionController="@_tool" />
5+
<SfDiagramComponent Connectors="@_connectors" Height="600px" InteractionController="@_tool" DrawingObject ="@_drawingObject" />
66

77
@code
88
{
99
// Enable the single tool.
1010
private DiagramInteractions _tool = DiagramInteractions.DrawOnce;
11+
// Drawing object used by the diagram.
12+
private Connector _drawingObject = new Connector()
13+
{
14+
ID = "connector1",
15+
Type = ConnectorSegmentType.Straight,
16+
};
1117
// Defines diagram's connectors collection.
1218
private DiagramObjectCollection<Connector> _connectors = new DiagramObjectCollection<Connector>();
1319
}

Diagram/Wasm/Pages/DrawingTools/ToolSelection.razor

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22

33
@using Syncfusion.Blazor.Diagram
44

5-
<SfDiagramComponent Connectors="@_connectors" Height="600px" InteractionController="@_tool" />
5+
<SfDiagramComponent Connectors="@_connectors" Height="600px" InteractionController="@_tool" DrawingObject="@_drawingObject" />
66

77
@code
88
{
99
// Enable the single tool.
1010
private DiagramInteractions _tool = DiagramInteractions.DrawOnce;
11+
// Drawing object used by the diagram.
12+
private Connector _drawingObject = new Connector()
13+
{
14+
ID = "connector1",
15+
Type = ConnectorSegmentType.Straight,
16+
};
1117
// Defines diagram's connectors collection.
1218
private DiagramObjectCollection<Connector> _connectors = new DiagramObjectCollection<Connector>();
1319
}

0 commit comments

Comments
 (0)