Working with overlapping SplineNodes?

I have generated a diagram with a bunch of overlapping SplineNodes (see the attachment). Now I face a challenge, since they are not treated as lines, but as nodes that have bounding rectangles:

a) can not see the tooltip of the some splines - the tooltip is for the bounding rectangle, not the line itself
b) can not select a particular spline - is there a way to implement a hit test for the line (not for the node)?

Is there a way to achieve such or similar results?



diagramWithSplines_2e2b1e3d.rar

5 Replies

IM Ivan Mitev February 19, 2010 02:01 PM UTC

Actually, I found out that this is not a problem only of SplineNode but for any lines. The bounding rectangle and the Z-order determines what will be displayed as a tooltip.

But could do you have a workaround? Will it be difficult, using a hit test to find what is the closest line to a certain point (e.g. when the user has clicked?


IM Ivan Mitev February 19, 2010 04:24 PM UTC

It turns out that the problem was only with the showing the tooltip (I guess it is difficult to precisely know which is the closest line). The good news for me is that the selection work as expected both for splines and for other lines.

My question now is can I know client-side which line will get selected after a click. There is a delay when displaying the newly selected line, which I guess is due to an AJAX call to determine the selected line and to highlight it?

I am asking this because I want to achieve the following: let the user double-click a line, gets its name client-side, and use it to query some some additional details about the item and display them on the page (by an AJAX call).


DM Dinesh M Syncfusion Team February 22, 2010 05:54 PM UTC

Hi Ivan,

Please use the OnClientNodeDoubleClick event to achieve your requirement.





Regards,
Dinesh


IM Ivan Mitev March 1, 2010 08:28 AM UTC

The approach with OnClientNodeDoubleClick ="OnNodeDoubleClick(this), false" worked fine, but is it possible to decide based on the type of the node to do a postback.

I need such functionality for the overlapping nodes. I think that client-side there is no reliable way to determine which spline line the user meant to click (the one which bounds are on top is passed to OnNodeDoubleClick). So the processing should be done server-side.


DM Dinesh M Syncfusion Team March 4, 2010 11:21 AM UTC

Hi Ivan,

Returning false in the client side event will prevent the corresponding server side event from being triggered.





We will follow up further in incident 65339.

Regards,
Dinesh


Loader.
Up arrow icon