Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Hyperlinks on nodes (Read 8173 times)
Rob
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Mar 7th, 2012
Hyperlinks on nodes
Mar 7th, 2012 at 11:23pm
Print Post  
I'm testing out the MVC flowcharting component.   So far it works pretty well and seems intuitive.

For our needs, we just want server generated flowcharts.   We don't need the interactive editing capability at all.   I seem to be able to get that by "disabling" the control.

However, we do want to use hyperlinks on the nodes.  I see there is a "DiagramItem.Hyperlink" property, but setting it doesn't seem to do anything.    If I enable the control, clicking on the node just brings up handles to edit / move the node.

Is there a way to just have a node be clickable with a supplied hyperlink?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Hyperlinks on nodes
Reply #1 - Mar 8th, 2012 at 7:30am
Print Post  
Hi,

We haven't implemented the Hyperlink property yet in our JavaScript library. You could assign the URL to the Tag property of items instead, and then handle the NodeClicked event to navigate the URL returned by e.getNode().getTag(). You can also set Behavior to DoNothing to prevent the diagram from being edited. Behavior was implemented just recently in the JS library -http://mindfusion.eu/Forum/YaBB.pl?num=1330695904.

If you don't need user interaction at all, you might check the HtmlBuilder server-side class. You can use it to generate bitmaps with clickable image maps whose AREAs correspond to the diagram elements. The AREA HREFs are set to the DiagramItem.HyperLink value. This will also let you display flowcharts in older browsers that do not support the CANVAS element.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Rob
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Mar 7th, 2012
Re: Hyperlinks on nodes
Reply #2 - Mar 8th, 2012 at 9:21pm
Print Post  
Thanks.   I figured out how to solve the user interaction problem without losing the ability to receive the onNodeClicked event:

view.Behavior = Behavior.DoNothing;
view.NodeClickedScript = "onNodeClicked";

As you suggested, I use the tag property to pass the URL to a handler.   Seems to work.    I'll start another topic for my next question.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint