Obsidian-Canvas-MindMap icon indicating copy to clipboard operation
Obsidian-Canvas-MindMap copied to clipboard

[Bug]: Auto-layout when making a sibling card causes child cards to overlap

Open duckfarts opened this issue 2 years ago • 7 comments

Bug Description

Currently, when you hit Enter to create a sibling node, it updates the layout to put all of that level's nodes together. This is problematic when you have a bunch of child nodes already, and causes your new child nodes to overlap with other ones.

I can see auto-layout being very helpful, but it would need to happen at multiple levels (which might be difficult if multiple cards connect to the same card).

Alternatively, it would be helpful to have an option to Disable Auto-layout so that creating a sibling card just makes another card under the current one, but doesn't update the layout.

Relevant Screenshot

Auto-layout issue

To Reproduce

  1. Make a few cards at the same level
  2. Add child cards to those cards
  3. Select a card created in step 1 and create a new sibling card
  4. Create child cards for the new card from step 3

Obsidian Version

v1.1.9

Checklist

  • [X] I updated to the latest version of the plugin.

duckfarts avatar Feb 14 '23 04:02 duckfarts

Can confirm same issue occurs with mine as well on 1.1.9

devinat1 avatar Feb 21 '23 17:02 devinat1

not the easiest to solve, also debatable if desirable.

wrightwriter avatar Mar 11 '23 16:03 wrightwriter

this fork fix this.

KuiyueRO avatar May 22 '23 14:05 KuiyueRO

this fork fix this.↳

it really work,dude thank you GIF 5-25-2023 5-23-05 PM

vectorstone avatar May 25 '23 09:05 vectorstone

this fork fix this.

For anyone else who is interested, it seems he deleted his fork and "close sourced" it under a new repo: https://github.com/xiehengjian/Obsidian-MindMap

I thought obfuscating the code was suspicious, so I decoded the whole thing... It turned out to be safe. Beyond that however, he is in violation of this repositories copyleft licensing.

Resident patent attorney @Quorafind, what is your judgement?

Lastly, his layout algorithm was unsurprising. It just recursively sums the heights of child chunks (child node heights + gap size) to determine the shape of the tree. Then he adjusts nodes to fit within said chunks and updates node-groups afterward.

tcardlab avatar Nov 18 '23 09:11 tcardlab

@tcardlab It's quite interesting, thank you for explaining all this to me. To be honest, I am shocked that someone thinks my code quality is so good. However, I don't agree with the behavior of using my code, which is under the GPL v3 license, for proprietary purposes just for profit.

The reason I chose this license instead of MIT in the first place was because the functionality related to MindMap can easily be resold, and I also hope that the relevant operational code can benefit subsequent developers.

If, as you say, he has gone proprietary without even altering some basic code logic, I think this behavior is inappropriate. If he plans to list it in the Obsidian plugin market in the future, I might raise an objection.

However, if he just created a similar plugin based on the same internal interfaces of Obsidian, I might not do much. But I think he needs to realize that although this issue is minor, similar actions in larger commercial endeavors in the future could have a much bigger impact.

Quorafind avatar Nov 20 '23 06:11 Quorafind

Makes sense. I'll invite you as a collaborator to a private fork of his repository should you ever wish to take a closer look at the decoded source and my process of doing so. Best of luck!

tcardlab avatar Nov 20 '23 13:11 tcardlab

Supported.

Quorafind avatar Sep 04 '24 01:09 Quorafind