Skip to content

Commit aff5820

Browse files
982382: Documentation for Allow drag within swimlane
2 parents c0ba221 + e201e45 commit aff5820

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

blazor/diagram/swimlane/lane/interaction.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The following example demonstrates a node with the text "AllowDrag Within Swimla
6666
@code
6767
{
6868
//Define diagram's swimlane collection
69-
DiagramObjectCollection<Swimlane> SwimlaneCollections = new DiagramObjectCollection<Swimlane>();
69+
private DiagramObjectCollection<Swimlane> SwimlaneCollections = new DiagramObjectCollection<Swimlane>();
7070
7171
protected override void OnInitialized()
7272
{
@@ -103,7 +103,7 @@ The following example demonstrates a node with the text "AllowDrag Within Swimla
103103
Width = 100,
104104
LaneOffsetX = 100,
105105
LaneOffsetY = 30,
106-
//Enable AllowDragWithinSwimlane to restrict movement outside the swimlane
106+
// To enable AllowDragWithinSwimlane to restrict movement outside the swimlane
107107
Constraints = NodeConstraints.Default | NodeConstraints.AllowDragWithinSwimlane ,
108108
Annotations = new DiagramObjectCollection<ShapeAnnotation>()
109109
{
@@ -137,10 +137,10 @@ The following example demonstrates a node with the text "AllowDrag Within Swimla
137137
if (obj is Swimlane swimlane)
138138
{
139139
swimlane.Header.Style = new TextStyle()
140-
{
141-
Fill = "#5b9bd5",
142-
StrokeColor = "#5b9bd5"
143-
};
140+
{
141+
Fill = "#5b9bd5",
142+
StrokeColor = "#5b9bd5"
143+
};
144144
foreach (Phase phase in swimlane.Phases)
145145
{
146146
phase.Style = new ShapeStyle() { Fill = "#5b9bd5", StrokeColor = "#5b9bd5" };
@@ -165,13 +165,25 @@ The following example demonstrates a node with the text "AllowDrag Within Swimla
165165

166166
The following example demonstrates enabling or disabling `AllowDragWithinSwimlane` dynamically at runtime by a button click.
167167

168+
<<<<<<< .mine
168169
```cshtml
169170
@using Syncfusion.Blazor.Diagram
171+
=======
172+
>**Note:**
173+
* To restrict a node to its owning swimlane, add **NodeConstraints.AllowDragWithinSwimlane** to the node’s `Constraints` property.
174+
>>>>>>> .theirs
170175
176+
<<<<<<< .mine
171177
<button onclick="@AllowDrag">AllowDrag</button>
172178
<SfDiagramComponent Height="600px" Swimlanes="@SwimlaneCollections" NodeCreating="@OnNodeCreating" >
173179
<SnapSettings Constraints="SnapConstraints.None"></SnapSettings>
174180
</SfDiagramComponent>
181+
=======
182+
* 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.
183+
184+
185+
186+
>>>>>>> .theirs
175187
176188
@code
177189
{

0 commit comments

Comments
 (0)