We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

diagram's move node method

Hi
I'm using syncfusion v:20.4.0.44 / visual studio 2022 / .Net 6

When a node drops on the diagram it will move to specific coordinates
The problem is when it moves a shade of node remains in the drop area until a click or scroll happens then the shade disappears!!!
for example :
node drops in point a and then moves to B. But a shade of node remains in A (dropped area)

I use this code to Move added node:

{

var dyCoordinate = -(addedNode.PinPoint.Y - BaseYLine);

var nodeColl = new NodeCollection {addedNode};

diagram.MoveNodes(nodeColl, 0.0F, dyCoordinate, MeasureUnits.Pixel);

}

I don't want to display this shade !

shade of node.png


2- there is something that I don't understand is :
 move Node method returns False But the node Moves correctly to the location I want.
I don't get why this returns False.


Thanks.
Best Regards


3 Replies 1 reply marked as answer

KR Karkuvel Rajan Shanmugavel Syncfusion Team March 21, 2023 01:07 PM UTC

Hi Mohammad,


Reported issue: Shade of the dropped node is not removed after moving the node to new location.


We have analyzed the reported issue with the provided details. But we are unable to reproduce the same issue in the sample with the provided details and code examples. We have attached the sample, please modify the sample to reproduce the issue in our end.


Regards,

Karkuvel Rajan S


Attachment: SyncFusion_Diagraming_Test_a22114e1.zip


MO mohammad replied to Karkuvel Rajan Shanmugavel March 26, 2023 09:37 AM UTC

Hi Karkuvel
thanks for your reply

I modified the sample you sent, But I did not get the shades problem !!!
I upload my code to see If you can help me out


New Edition :
I've found the cause of shades problem:
diagram.Focus():  is the reason . 

I don't know why this was a problem




Attachment: SyncFusion_Diagraming_Test_8950fe2c.rar


Marked as answer

PP Prakash Perumal Syncfusion Team March 28, 2023 04:39 PM UTC

Hi Mohammad,


We have validated the provided sample and found that the issue can be replicated when the diagram.Focus() method is added, as reported. By default, the diagram will automatically be brought into focus when an item is added to the diagram by drag and dropping it from the palette. Could you please share us the purpose of adding this method explicitly in NodeCollectionChanging event?


Regards,

Prakash


Loader.
Live Chat Icon For mobile
Up arrow icon