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
close icon

Symbol OnMove()

I've been running into problems while migrating to the new 5.1.0.51 diagram, I was using the Symbol class which used to inherit from Node, now it's obsolete so I changed my symbol base to inherit from Node. I used to override the OnMove method to insert custom code and checking while symbols are moving, now node have the Move method which is not virtual, I also used to rely on MoveEventArgs.Nodes to pass the currently moving nodes. Any ideas how to provide the same services using the new library.

1 Reply

JS Jeba S Syncfusion Team September 11, 2007 02:57 AM UTC

Hi Shinnawy,

Thank you for posting query to us.

OnMove() is no longer valid in v.5. You can use EventSink.NodeCollectionChanged() and EventSink.SizeChanged instead.
Please refer to the following code snippets:

this.diagram.Controller.Model.EventSink.Start();
this.diagram.Controller.Model.EventSink.PinPointChanged += new PinPointChangedEventHandler(EventSink_PinPointChanged);
this.diagram.Controller.Model.EventSink.SizeChanged += new SizeChangedEventHandler(EventSink_SizeChanged);

void EventSink_PinPointChanged(PinPointChangedEventArgs evtArgs)
{
Console.WriteLine(evtArgs.NodeAffected.Name);
}

void EventSink_PinPointChanged(PinPointChangedEventArgs evtArgs)
{
Console.WriteLine(evtArgs.NodeAffected.Name);
}


Please refer the forum thread for more details:
http://www.syncfusion.com/support/forums/message.aspx?MessageID=59050

Regarding migration from v4.4 to V5.1 of Essential Diagram has been fully refactored to make the product more stable and maintainable. Hence it is completely a new version. I have attached the migration document that helps you to migrate your code from v4.4 to v5.1. You can get the document from the following link :
http://www.syncfusion.com/Support/user/uploads/Migration_680cbfe3.zip

Kindly let us know if you need any further assistance.

Thank you for using Syncfusion Products.

Best Regards,
Jeba.

Loader.
Live Chat Icon For mobile
Up arrow icon