Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Dashboard with custom blocks (Read 1987 times)
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Dashboard with custom blocks
Jan 14th, 2020 at 11:02am
Print Post  
Hi, I want to create a dashboard in which there will a tool box which contains different sizes blocks, A user can create a dashboard by simply drag and drop the blocks and it will fit to the page size.blocks types: small, medium,rectangle etc. Please give some idea if it is possible with this.
  
Back to top
AIM  
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Dashboard with custom blocks
Reply #1 - Jan 14th, 2020 at 11:37am
Print Post  
Hi,

You can add your prototype nodes of different sizes to NodeListView, and drag and drop to the diagram canvas will clone the nodes. Set NodeListView.iconSize to null and it will draw with your sizes instead of applying a uniform one.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Re: Dashboard with custom blocks
Reply #2 - Jan 15th, 2020 at 5:17am
Print Post  
Can you please help me with some example, I didn't get how to set the different sizes.
  
Back to top
AIM  
IP Logged
 
Iva_P
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 19th, 2013
Re: Dashboard with custom blocks
Reply #3 - Jan 15th, 2020 at 11:12am
Print Post  
You can get the desired result by adding the following lines to the "Controls" sample of the control:

Code (Javascript)
Select All
//where the NodeListView gets initialized
nodeList.setIconSize(null);
nodeList.setDefaultNodeSize (null);
 



Code (Javascript)
Select All
function initNodeList(nodeList, diagram)
{
    .................................
    //inside the cycle where shape prototypes are created
    node.setBounds(new MindFusion.Drawing.Rect(0, 0, (i+1)*10, (i+1)*10));
}
 



Let me know if you want me to send you the modified sample.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint