You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/diagram/swimlane/lane/interaction.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ The following image shows children interaction in lane.
50
50
51
51
## How to restrict nodes from being dragged or repositioned outside their assigned swimlane
52
52
53
-
To restrict child nodes to their swimlane, set their [Constraints](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Node.html#Syncfusion_Blazor_Diagram_Node_Constraints) to include [NodeConstraints.AllowDragWithinSwimlane](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.NodeConstraints.html#Syncfusion_Blazor_Diagram_NodeConstraints_AllowDragWithinSwimlane). By default, nodes can move freely; however, with this constraint enabled, a node can only be dragged within the bounds of its owning swimlane. Attempts to move it across lane or swimlane boundaries are prevented.
53
+
To restrict child nodes to their swimlane, set their [Constraints](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Node.html#Syncfusion_Blazor_Diagram_Node_Constraints) to include **NodeConstraints.AllowDragWithinSwimlane**. By default, nodes can move freely; however, with this constraint enabled, a node can only be dragged within the bounds of its owning swimlane. Attempts to move it across lane or swimlane boundaries are prevented.
54
54
55
55
The following example demonstrates one node restricted to its swimlane, while another remains unrestricted for comparison.
56
56
@@ -64,7 +64,7 @@ The following example demonstrates one node restricted to its swimlane, while an
64
64
@code
65
65
{
66
66
//Define diagram's swimlane collection
67
-
DiagramObjectCollection<Swimlane> SwimlaneCollections = new DiagramObjectCollection<Swimlane>();
67
+
private DiagramObjectCollection<Swimlane> SwimlaneCollections = new DiagramObjectCollection<Swimlane>();
68
68
69
69
protected override void OnInitialized()
70
70
{
@@ -101,7 +101,7 @@ The following example demonstrates one node restricted to its swimlane, while an
101
101
Width = 100,
102
102
LaneOffsetX = 100,
103
103
LaneOffsetY = 30,
104
-
//Enable AllowDragWithinSwimlane to restrict movement outside the swimlane
104
+
// To enable AllowDragWithinSwimlane to restrict movement outside the swimlane
Annotations = new DiagramObjectCollection<ShapeAnnotation>()
107
107
{
@@ -129,10 +129,10 @@ The following example demonstrates one node restricted to its swimlane, while an
129
129
if (obj is Swimlane swimlane)
130
130
{
131
131
swimlane.Header.Style = new TextStyle()
132
-
{
133
-
Fill = "#5b9bd5",
134
-
StrokeColor = "#5b9bd5"
135
-
};
132
+
{
133
+
Fill = "#5b9bd5",
134
+
StrokeColor = "#5b9bd5"
135
+
};
136
136
foreach (Phase phase in swimlane.Phases)
137
137
{
138
138
phase.Style = new ShapeStyle() { Fill = "#5b9bd5", StrokeColor = "#5b9bd5" };
@@ -145,10 +145,10 @@ The following example demonstrates one node restricted to its swimlane, while an
145
145
else if (obj is Node node)
146
146
{
147
147
node.Style = new ShapeStyle()
148
-
{
149
-
Fill = "#5b9bd5",
150
-
StrokeColor = "#5b9bd5"
151
-
};
148
+
{
149
+
Fill = "#5b9bd5",
150
+
StrokeColor = "#5b9bd5"
151
+
};
152
152
}
153
153
}
154
154
}
@@ -159,7 +159,7 @@ A complete working sample can be downloaded from [GitHub](https://github.com/Syn
159
159

160
160
161
161
>**Note:**
162
-
* To restrict a node to its owning swimlane, add [NodeConstraints.AllowDragWithinSwimlane](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.NodeConstraints.html#Syncfusion_Blazor_Diagram_NodeConstraints_AllowDragWithinSwimlane) to the node’s `Constraints` property.
162
+
* To restrict a node to its owning swimlane, add **NodeConstraints.AllowDragWithinSwimlane** to the node’s `Constraints` property.
163
163
164
-
* To enforce this restriction for all child nodes within swimlanes, set the [Constraints](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Node.html#Syncfusion_Blazor_Diagram_Node_Constraints) during node initialization in the NodeCreating event.
164
+
* To enforce this restriction for all child nodes within swimlanes, set the [Constraints](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Node.html#Syncfusion_Blazor_Diagram_Node_Constraints) during node initialization in the [NodeCreating](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_NodeCreating) event.
0 commit comments