Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Different between each clientsidemode (Read 4031 times)
Shah
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jan 4th, 2016
Different between each clientsidemode
Jun 10th, 2016 at 3:36am
Print Post  
Hi,

May I know what are the differences between each clientsidemode or is there any documentation that stated what each of clientsidemode can and can't do.

Thanks.
Shah
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Different between each clientsidemode
Reply #1 - Jun 10th, 2016 at 6:08am
Print Post  
Hi,

There are differences in how the diagram is drawn, where it raises events, where you can program it from, and browser requirements.

ImageMap mode draws the diagram on server side inside a bitmap, which is then rendered in the browser via IMG tag. It raises server-side .NET events and you can modify the diagram model only from server code. This mode works in any browser.

Canvas mode draws the diagram on client side using HTML 5 Canvas element. This works in any browser released in last 5-6 years, and requires JavaScript to be enabled. Events are raised on client side (unless you enable AutoPostBack), and you can change the diagram model either on client or server side.

JavaApplet mode is not something you should start using nowadays, we keep it only for compatibility. Recent versions of all major browsers have dropped support for Java applets and Oracle is removing them from Java 9 AFAIK.

You can find some documentation here -
http://www.mindfusion.eu/onlinehelp/netdiagram/index.htm?NetDiagram_front_ends.h...

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Shah
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jan 4th, 2016
Re: Different between each clientsidemode
Reply #2 - Jun 13th, 2016 at 3:28am
Print Post  
Hi Slavcho,

Thanks for the feedback.Is that means clicked event are raised only on client side for canvas mode ?

Thanks,
Shah
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Different between each clientsidemode
Reply #3 - Jun 13th, 2016 at 2:00pm
Print Post  
Hi Shah,

That's right, in Canvas mode you can assign the name of a JavaScript function to NodeClickedScript to handle click events on client side. Only some events related to changing the diagram model can be raised on server, if you enable AutoPostback - such as Created/Modified/Deleted.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Shah
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jan 4th, 2016
Re: Different between each clientsidemode
Reply #4 - Jun 14th, 2016 at 2:22am
Print Post  
Hi,

Is there any sample code for onclick function that I can refer to?

Thanks.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Different between each clientsidemode
Reply #5 - Jun 14th, 2016 at 12:16pm
Print Post  
Hi,

Here's an example -

Code
Select All
<ndiag:DiagramView  ... NodeClickedScript = "onNodeClicked" />

<script type="text/javascript">
function onNodeClicked(sender, e)
{
	e.getNode().setText("click-click");
	e.getNode().setBrush("orange");
}
</script> 



You can find other sample handlers in NetworkChart and Animations sample projects.

If you'd like to handle clicks on server side for some reason, you could either call a web service from the client-side handler, or set a hidden field's value to identify the data you need and call submit() function.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Shah
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jan 4th, 2016
Re: Different between each clientsidemode
Reply #6 - Jun 15th, 2016 at 8:04am
Print Post  
Hi Slavcho,

Thanks for the feedback and info..very helpful. Smiley Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint