Exception when trying to draw connection from port

Hi,

I have looked at your examples where a user can draw a connection directly from a port.
The example I have downloaded works fine on my PC.

However when I try to enable it in my code using a simple example I get a exception in chrome (see attachment)
The C# code I have added is below. The exception is thrown when I try to add the connection using the mouse from the port.
What am I missing?

 var test = new DiagramNode()
      {
        Id = "node1",
        Height = 100,
        Width = 100,
        OffsetX = 300,
        OffsetY = 100,
        Annotations = new ObservableCollection()
                {
                    new DiagramNodeAnnotation(){
                        Content="Node1"
                    }
                },
        Ports = new ObservableCollection()
                {
                    new DiagramPort()
                    {
                        Offset = new NodePortOffset() { X = 1, Y = 0.5},
                        Visibility = PortVisibility.Visible,
                        Constraints = PortConstraints.Draw
                    }
                }
      };
      nodeCollection.Add(test);


Attachment: exception_a031236d.zip

12 Replies 1 reply marked as answer

GG Gowtham Gunashekar Syncfusion Team June 11, 2021 01:11 PM UTC

Hi Torben, 
 
We can able to replicate the reported issue at our end we are validating the issue and update you with more details on 15th June 2021(two business days). . We appreciate your patience until then.  
   
 
Regards,  
Gowtham   



GG Gowtham Gunashekar Syncfusion Team June 15, 2021 02:55 PM UTC

 
Hi Torben, 
    
Reported Issue : An exception occurs when drawing a connector using the port draw 
 
We can reproduce the issue and confirmed this as a defect. We have logged a defect report for this issue. We will fix this issue and provide the patch on 6th July,2021 weekly patch release.    
     
    
Regards, 
Gowtham 
 
 
 



GG Gowtham Gunashekar Syncfusion Team July 6, 2021 12:58 PM UTC

Hi Torben,  
 
Sorry for the inconvenience caused. Due to complexity of the issue, we are not able to include the fix for the issue in this week patch release. We will include the fix for the issue in next weekly patch release which is tentatively scheduled to release on July 13th   2021. 
 
 
     
Regards,  
Gowtham  



TL Torben Laursen July 18, 2021 09:03 AM UTC

Hi,

I am unable to open the provided link. Has a fix been released for this issue?



AR Aravind Ravi Syncfusion Team July 19, 2021 12:03 PM UTC

Hi Torben, 
 
We have fixed the reported issue and it will release in this weekly patch release which is scheduled to release on Tomorrow. We appreciate your patience until then.  
 
Please check now, the below feedback link gets open at our end.  
 
 
Regards 
Aravind Ravi 



GG Gowtham Gunashekar Syncfusion Team July 20, 2021 01:59 PM UTC

Hi Torben,  
  
We have fixed the reported issue and included it in our patch release (v 19.2.48 ) which is rolled out successfully.           
           
Please upgrade to the latest version packages to resolve this issue.         
         
  
Regards,     
Gowtham    


Marked as answer

TL Torben Laursen July 21, 2021 09:29 AM UTC

Thanks it works now



GG Gowtham Gunashekar Syncfusion Team July 22, 2021 10:55 AM UTC

 
Hi Torben, 
 
Thanks for your update. Please let us know whether you need any further assistance on this. 
 
 
Regards  
Gowtham 



TL Torben Laursen July 26, 2021 02:12 PM UTC

Sorry to bug you again, but I still have problems with this.

Attached is a example.

The node has 2 ports.

Draw a connection from one of them and then from the other one.

Note how the first connector is hidden and only one connection is visible no matter how many connections are drawn.

It seems to be related to setting "ConnectorDefaults". Remove line 35 and the issue is not there.

How to I get this to work in combination with ConnectorDefaults?


Attachment: ChnageToolTipContnet_cad556ec.zip


GG Gowtham Gunashekar Syncfusion Team July 27, 2021 10:55 AM UTC

Hi Torben, 
  
On the further analysis of the shared sample, we found you have set the id for the connector as " Stream” in GetConnector method and set the method to connectorDefaults, so when event we create a new connector, it has created in the same id, so the previous created connector gets disappeared.  In diagram its mandatary that all the nodes and connectors should have a unique alphanumeric id. We suggest you set the unique id for all the connectors in connectorDefaults or else do not set id in connectorDefaults, the diagram will automatically create and assign a unique id to each connector when it created from port.  
 
 
Code snippet: 
 
            public DiagramConnector GetConnector(Guid idGuid, Syncfusion.Blazor.Diagrams.Segments type = Syncfusion.Blazor.Diagrams.Segments.Orthogonal, DecoratorShapes decoratorShape = DecoratorShapes.Arrow) 
    { 
       //... 
       //... 
       //... 
      DiagramConnector diagramConnector = new DiagramConnector() 
      { 
// set unique id to all the connectors 
        Id = idGuid, 
        //... 
        //... 
        //... 
      }; 
      return diagramConnector; 
    } 
 
 
 
 
Regards,  
Gowtham  
 



TL Torben Laursen July 28, 2021 09:19 AM UTC

Thanks, I changed the code so I no longer set id in connectordefault and the issue is now solved



GG Gowtham Gunashekar Syncfusion Team July 29, 2021 06:31 AM UTC

Hi Torben,  
 
Thanks for your update. Please let us know whether you need any further assistance on this. 
 
Regards  
Gowtham 


Loader.
Up arrow icon