Diagram resizing on drag

I have a diagram configured as follows

        

@bind-Nodes="@nodes"
@bind-Connectors="@connectors"
ConnectorCreating="@ConnectorCreating"
CollectionChanged="Clicked">


I can add nodes to the diagram programmatically using

 Node diagramNode = new Node()
{
ID = id,
OffsetX = x,
OffsetY = y,
Width = 120,
Height = 70,
Shape = new FlowShape() { Type = shapes.Flow, Shape = shape },
Style = new ShapeStyle() { Fill = fillColor, StrokeColor = stroke },
Annotations = new DiagramObjectCollection() { annotation },
};
nodes.Add(diagramNode);


That all works fine. When I then drag the node, the diagram "shrinks" to fit the nodes instead of retaining the original height and width. Is there a way to override this resizing to retain the original height and width options?


1 Reply

SU Sumathi Uthayakumar Syncfusion Team August 8, 2022 03:09 PM UTC

Hi,


We assume that the reported issue is "the diagram getting zoomed out while dragging the node". We have prepared a sample to replicate this issue at our end. But we didn’t face any issue and shared the sample and video for your reference.


If our assumption is different from the reported issue, please replicate the issue in the provided sample or provide more details like video or detailed explanation to represent the issue. This helps us to serve you better.


Regards,

Sumathi U.



Note: If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Attachment: SampleAndVideo_4ba2d3d2.zip

Loader.
Up arrow icon