Snap to some objects


I have a view with a GoGrid on it.

How can i snap a dragging object to another object which was placed on a view?

For example i am dragging MyNode (MyNode is derived from GoDrawingNode class) and i want to snap it to the nearest another GoObject. If the nearest GoObject is GoStroke it must be snapped to the nearest GoStroke's point by center of MyNode. If the bearest GoObject is another class, it must be snapped by another rule. How can i do that?


Check out the Pipes demo.