marcelklehr / buzzmap

draw and edit mindmaps interactively, using force-directed layouts (jQuery plugin)
marcelklehr.github.com/buzzmap
Other
22 stars 17 forks source link

I would like to hide their children earlier and display only the parent before #4

Open fucore opened 11 years ago

marcelklehr commented 11 years ago

This project is actually based upon keneth kufluk's js-mindmap (demo), which presumably does exactly what you need.

Alternatively, you could adjust buzzmap to hide the parent's other children if one node's children are being viewed. The relevant method to tweak would be Node#display

fucore commented 11 years ago

I'll have to adjust the SVG and jQuery that makes mounting the father and the children right?

marcelklehr commented 11 years ago

You'd have to modify the part of the code I linked to, plus the initial definition of root nodes: https://github.com/marcelklehr/buzzmap/blob/master/buzzmap.js#L112

(there's a global root node, which is invisible, all normal root nodes are children of this one.)

the active class indicates if a node's children should be displayed.

marcelklehr commented 11 years ago

(You don't have to manipulate anything about raphael/svg (the connecting lines). they'll only appear if both nodes are visible.)