Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Create interactive List (Tree hierarchy) (Read 1499 times)
Davaaron
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 42
Joined: Jul 12th, 2018
Create interactive List (Tree hierarchy)
Sep 19th, 2018 at 10:05am
Print Post  
Hi,

is it possible to create a treeview? (Something like this https://i.stack.imgur.com/G6eR9.png)

The icons should be replacable and the list entries should be interactive (listen to user/dom events, drag and drop).
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Create interactive List (Tree hierarchy)
Reply #1 - Sep 19th, 2018 at 2:32pm
Print Post  
Hi,

The layout looks like what's shown in tutorial #2. Set the Expandable property of nodes to let users collapse and expand back tree branches. For appearance, try using CompositeNode or set image and text alignments in transparent ShapeNode.

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


I Love MindFusion!

Posts: 42
Joined: Jul 12th, 2018
Re: Create interactive List (Tree hierarchy)
Reply #2 - Sep 19th, 2018 at 9:29pm
Print Post  
I fear that using BorderedTreeLayout won't work because I want to show multiple independent structures like this and I can only choose one layout for the diagram, right?

But I try it with container nodes.
Where can I read more about the properties of classFromTemplate Json when creating a composite node?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Create interactive List (Tree hierarchy)
Reply #3 - Sep 20th, 2018 at 9:50am
Print Post  
BorderedTreeLayout should arrange all independent trees it finds when you call diagram.arrange, or if the trees are inside containers, call container.arrange instead.

You can find classFromTemplate example here -
https://www.mindfusion.eu/onlinehelp/jsdiagram/index.htm?Composite_Nodes.htm

The properties you can use are ones of MindFusion.Drawing obejcts like Rect, Image and Text -
https://www.mindfusion.eu/onlinehelp/jsdiagram/index.htm?CC_N_MindFusion_Drawing...

You could as well build the component hierarchy from JS code without using templates, but I'm not sure if we have the TypeScript bindings for that yet.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint