Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic GetHeaderFromPoint in Javascript (Read 1597 times)
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
GetHeaderFromPoint in Javascript
Nov 12th, 2013 at 10:09pm
Print Post  
Hi,

Thanks to some code that you provided more that a year ago, I have been able to do the following:

Code
Select All
protected void OnNodeClicked(object sender, NodeEventArgs e)
    {
RectangleF bounds = RectangleF.Empty;
            Header header = DiagramView1.Diagram.LaneGrid.GetHeaderFromPoint(e.MousePosition, ref bounds);
... 



I now need to accomplish the same thing in Javascript.
However, if I try the following, the alert does not fire.
Any suggestions?

Code (Javascript)
Select All
function onClientNodeClicked(sender, args)
            {
var mousePos = args.getMousePosition();
                        alert('mousePos = ' + mousePos);
... 



Here's the DiagramView declaration:

Code (HTML)
Select All
<ndiag:DiagramView ID="DiagramView1" runat="server" ClientSideMode="ImageMap" Behavior="DoNothing"
                                        Height="100%" NodeClickedScript="onClientNodeClicked" OnCreatingAreaElement="DiagramView1_OnCreatingAreaElement"
                                        LinkClickedScript="onClientLinkClicked" EnableViewState="true">
                                    </ndiag:DiagramView> 



Thanks in advance for any assistance.

Jim
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GetHeaderFromPoint in Javascript
Reply #1 - Nov 13th, 2013 at 7:54am
Print Post  
Hi,

Unfortunately you can't do that much on client side in ImageMap mode. You could get the mouse position by adding your own event listeners to the node's AREA element, but then the LaneGrid and Header objects are not accessible either on the client side.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint