Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic NodeClickedScript not firing for certain shapes (Read 4818 times)
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
NodeClickedScript not firing for certain shapes
Sep 5th, 2013 at 3:41pm
Print Post  
Hi,

I have specified NodeClickedScript on my DiagramView and it works just fine for most of my nodes.  However, some do not work.
I have placed an alert in the called function, but I get nothing for the nodes in question.

Here's my 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> 



I have attached 3 files:
- One showing the page source with callouts
- One showing the function that is supposed to be called
- One showing the diagram itself

I am passing semicolon delimited values in the node's Tag field, which I see in the EventArgs in the page source.  Could the issue be data related? 

Any advice would be appreciated.

Thanks in advance.

Jim
  

onClientNodeClicked_Issue_-_Function_Shot_-_05Sep2013.png (Attachment deleted)
onClientNodeClicked_Issue_-_05Sep2013.png (Attachment deleted)
onClientNodeClicked_Issue_-_Diagram_Shot_-_05Sep2013.png (Attachment deleted)
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: NodeClickedScript not firing for certain shapes
Reply #1 - Sep 6th, 2013 at 12:12pm
Print Post  
Hi,

This issue has become a bit of a show-stopper for our project.
If you can get back to me with some ideas before the end of the day, that would be great.  I'm likely going to be working over the weekend and would appreciate some advice on resolving this issue.

Thanks

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NodeClickedScript not firing for certain shapes
Reply #2 - Sep 6th, 2013 at 4:46pm
Print Post  
You guys should renew your support subscription if you expect us to spend hours helping you.

Seeing that this is the rightmost node and the only one with COORDS values larger than 1000, check if it becomes clickable if you move it to the left from code. The browser you are using might have some limitation and fail to detect clicks at AREAs with large coordinates. If that's the problem, setting DiagramView.MaxImageSize to a smaller size than 1000 should help.

You could also try setting the node's Shape to Rectangle to see if it becomes clickable. If that helps and you still want the shapes to look rounded, you could replace its coords and shape attributes with shape="rect" coords="l,t,r,b" from CreatingAreaElement event handler, where the coordinates match the node.Bounds value converted to pixels.

If none of that helps, please attach the saved diagram file and our developer will investigate.

Stoyan
  
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: NodeClickedScript not firing for certain shapes
Reply #3 - Sep 6th, 2013 at 4:52pm
Print Post  
Hi,

I wasn't aware that our support subscription was not up to date.
I'll certainly pursue that with my management.
Your support has been great.

Anyway, here's an update.

I've stumbled on something that appears to be causing the issue.
One of the field values that is being placed in the node.Tag is text from a multi-line textbox.  If I hit Return while entering data into this textbox, the script does not fire.

I have attached 2 files that show the page source with a single line of text entered into this field, and one where I entered 2 lines of text with a hard return in between.

This is a big clue, and as I had expected, it's data related.
'Hope this helps get to a resolution faster.

Thanks

Jim
  

onClientNodeClicked_Issue_-_Page_Source_Not_Working_-_06Sep2013.png (Attachment deleted)
onClientNodeClicked_Issue_-_Page_Source_Working_-_06Sep2013.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NodeClickedScript not firing for certain shapes
Reply #4 - Sep 6th, 2013 at 5:15pm
Print Post  
Then I suppose JavaScript might not like it when a new line symbol comes before the closing quote of a string. Doesn't the browser show any script errors when you click that node? If that's what stops the clicks, you can work around it by replacing \r\n in Tag strings with \\r\\n, so that they are rendered as escape symbols in the onclick code.
  
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: NodeClickedScript not firing for certain shapes
Reply #5 - Sep 6th, 2013 at 5:31pm
Print Post  
Hi,

Thanks for the prompt reply.
I'll try what you suggested.
And I will look into our support contract with you folks.
Have a great weekend.

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