Class DiagramOverviewConstraints
Specifies the interaction setting (such as the zoom, pan, draw, and tap) enabled or disabled in overview component.
Inheritance
System.Object
DiagramOverviewConstraints
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class DiagramOverviewConstraints : Enum
Examples
<SfDiagramComponent @ref = "diagram" Height="600px" Width="90%" ID="diagram" @bind-Nodes="nodes"
@bind-Connectors="connectors">
</SfDiagramComponent>
<SfDiagramOverviewComponent Width = "400" Height="300" SourceID="diagram" Constraints="DiagramOverviewConstraints.Zoom"></SfDiagramOverviewComponent>
@code {
SfDiagramComponent diagram; DiagramObjectCollection<Node> nodes; DiagramObjectCollection<Connector> connectors;
protected override void OnInitialized()
{
nodes = new DiagramObjectCollection<Node>();
connectors = new DiagramObjectCollection<Connector>();
Node node1 = new Node()
{
ID = "node1",
Height = 100,
Width = 100,
OffsetX = 100,
OffsetY = 100,
Style = new ShapeStyle()
{
Fill = "#6BA5D7",
StrokeColor = "white",
StrokeWidth = 1
}
};
Node node2 = new Node()
{
ID = "node2",
Height = 100,
Width = 100,
OffsetX = 300,
OffsetY = 100,
Style = new ShapeStyle()
{
Fill = "#6BA5D7",
StrokeColor = "white",
StrokeWidth = 1
}
};
nodes.Add(node1); nodes.Add(node2);
Connector connector1 = new Connector()
{
ID = "connector1",
SourceID = "node1",
TargetID = "node2",
Type = ConnectorSegmentType.Straight,
Style = new ShapeStyle()
{
Fill = "#6BA5D7",
StrokeWidth = 2
}
};
connectors.Add(connector1);
}
}
Fields
Default
Enables all the interactions in overview component.
Declaration
public const DiagramOverviewConstraints Default
Field Value
DrawFocus
Enables to zoom or change the viewport area of the diagram by drawing the new rect in the overview component.
Declaration
public const DiagramOverviewConstraints DrawFocus
Field Value
None
Disables all the interactions in overview component.
Declaration
public const DiagramOverviewConstraints None
Field Value
Pan
Enables the panning interaction in overview component.
Declaration
public const DiagramOverviewConstraints Pan
Field Value
TapFocus
Enables the panning of the diagram viewport to specific focus point by tap on the overview component
Declaration
public const DiagramOverviewConstraints TapFocus
Field Value
Zoom
Enables the zooming interaction in overview component.
Declaration
public const DiagramOverviewConstraints Zoom