Diagram drag and drop node (v 19.4.0.38)

 Hi, 

I am trying the following, I have a diagram that contains nodes, those are using the card component to be rendered. I started with one of your example :

https://www.syncfusion.com/forums/158986/dragging-nodes-to-create-and-delete-connections
and made some adjustments :

  <SfDiagram Width="1000px" Height="@Height" @ref="@diagram" Nodes="nodes">

            <DiagramEvents OnDrop="@OnDrop" SelectionChanged="@SelectionChange"></DiagramEvents>

            <DiagramTemplates>

            <NodeTemplate>

                @{

                    var noeudDirection = context as Node;

                    if (noeudDirection.Data.Contains("|"))

                    {

                        <SfCard ID="@((context as Node).Id)">

                            <CardHeader Title="@(noeudDirection.Data.Split("|")[0])" SubTitle="@(noeudDirection.Data.Split("|")[1])" ImageUrl=@(noeudDirection.Data.Split("|")[2]) />

                        </SfCard>

                    }

                    else


                    {

                        <SfCard ID="@((context as Node).Id)">

                            <CardHeader Title="@((context as Node).Data)" ImageUrl="@((context as Node).Data)" />

                        </SfCard>

                    }


                }

            </NodeTemplate>

            </DiagramTemplates>

        </SfDiagram>

and 


 protected override void OnInitialized()

    {

        Palettes = new ObservableCollection<SymbolPalettePalette>();


        nodes = new ObservableCollection<DiagramNode>();



        data.Add("Mass", 15);

        data.Add("Pressure", 50);

        data.Add("Velocity", 30);


        DiagramNode node1 = new DiagramNode()

        {

            Id = "node1",

            Height = 100,

            Width = 100,

            OffsetX = 300,

            OffsetY = 100


        };

        node1.Constraints = NodeConstraints.Default | NodeConstraints.AllowDrop;

        nodes.Add(node1);


        basicShapes = new ObservableCollection<Object>()

        {


                new DiagramNode()

                {

                Id = "Rectangle",

                Shape = new DiagramShape() { Type = Shapes.Basic, BasicShape = Syncfusion.Blazor.Diagrams.BasicShapes.Rectangle },

                AddInfo = data

                },


                };

        Palettes.Add(new SymbolPalettePalette() { Id = "BasicShapes", Expanded = true, Symbols = basicShapes, Title = "Basicshapes" });


    }


Now look what happens in the console when I do the following steps :

1- Drag a new node image_6.png

2- Move the first node aroundimage_8.png

3- Drop the new node into the node 1 :

The exception appears and the event will not be triggered. 

Can you reproduce and gives some advice as how to mitigate that error?

Thanks 


5 Replies

AM Arunkumar Manoharan Syncfusion Team February 1, 2022 12:23 PM UTC

Hi Nicolas,


We are validating your requirement and update you with more details within two business days.


Regards,

Arun Kumar



NN Nicolas Navier February 7, 2022 04:15 PM UTC

Hi  Arun,

Did you successfully reproduce the issue ?




AM Arunkumar Manoharan Syncfusion Team February 8, 2022 02:26 PM UTC

Hi Nicolas,


We have logged “An Exception raises when dragging and dropping node over another node in the diagram” as a defect. The fix for this issue will be included in our weekly patch release February 23, 2022 and we will provide you the feedback link by tomorrow to track the status of this bug.


Regards,

Arun Kumar.



AM Arunkumar Manoharan Syncfusion Team February 24, 2022 11:06 AM UTC

Hi Nicolas,


Sorry for the inconvenience caused.

We have fixed the issue and testing the issue in various scenarios. However, we will include the fix in our next weekly patch release which is tentatively scheduled to release on March 2, 2022.


Regards,

Arun Kumar.



AM Arunkumar Manoharan Syncfusion Team March 3, 2022 10:13 AM UTC

Hi Nicolas,


We have fixed the reported issue and included it in our latest patch release which is rolled out successfully.


Please upgrade to the latest NuGet version to resolve this issue.



Regards 

Arun Kumar.


Loader.
Up arrow icon