Open fucore opened 11 years ago
I'll have to adjust the SVG and jQuery that makes mounting the father and the children right?
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.
(You don't have to manipulate anything about raphael/svg (the connecting lines). they'll only appear if both nodes are visible.)
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