Collapsing every sub-level of the mindmap with a command
Hey, thank you so much for the excellent plug-in Would it be possible to have a command (hotkey) to collapse / fold everything in a mindmap

to this

However of course that can normally be achieved by clicking on the top level circles (in this case "1" and "2)
What I mean is being able to have everything inside the top level collapsed as well.
So that when I expand "1" and "2" the contents inside of it is also correctly folded
like this

Thank you so much again, being able to use your plugin is one of my favorite aspect of Obsidian
I agree this would be awesome for navigating easier in a large mindmap.
This would be useful, and it seems that the underlying library markmap supports initialExpandLevel. https://markmap.js.org/docs/json-options#initialexpandlevel. Example https://markmap.js.org/repl, look at Expand all levels and Limit expand level.
Any pointers how you would want someone to contribute this @lynchjames if we sent in a PR?
I also imagine how this could be a command palette type command to fold/unfold to level X. Similar to this issue in the visual code markmind mindmap plugin https://github.com/markmap/markmap-vscode/issues/19, so implementation may be similar too.
See also PR https://github.com/lynchjames/obsidian-mind-map/pull/89
I implemented this with the following 2 PRs:
- https://github.com/lynchjames/obsidian-mind-map/pull/102 (upgrade mindmap, to make the next possible)
- folding shortcuts / commands (open to suggestions how to implement the commands, I was inspired by how visual studio code does shortcuts) https://github.com/lynchjames/obsidian-mind-map/pull/103