Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic javaApplet client-side events reference or tutorial (Read 1527 times)
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
javaApplet client-side events reference or tutorial
Oct 16th, 2012 at 1:36am
Print Post  
I was following the javascript diagramming reference and the piece of code below does not seem to work in javaapplet client side events.



Code (Javascript)
Select All
    // paint all nodes with light blue color
    diagram.nodes.forEach(function (node)
    {
        node.setBrush(scriptHelper.createSolidBrush(205, 92, 92));
    }); 



Is the javascript reference built for imageMap?

Is there a way to enable javascript intellisense in VS 2010?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: javaApplet client-side events reference or tutorial
Reply #1 - Oct 16th, 2012 at 6:26am
Print Post  
The JavaScript reference is for ClientSideMode = Canvas. You can find the API for JavaApplet documented here:
http://www.mindfusion.eu/onlinehelp/netdiagram/index.htm?refcom_mindfusion_diagr...

forEach is a method of JavaScript arrays and won't work with Java collections. You can iterate over the Java diagram nodes like this:

Code
Select All
for (var i = 0; i < diagram.getNodes().size(); ++i)
{
      var node = diagram.getNodes().get(i);
      node.setBrush(scriptHelper.createSolidBrush(205, 92, 92));
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint