MarkMindCkm / obsidian-enhancing-mindmap

obsidian plugin editable mindmap,you can edit mindmap on markdown file
MIT License
592 stars 51 forks source link

Auto updating replaces last node text with default node text #38

Open Jopp-gh opened 3 years ago

Jopp-gh commented 3 years ago

This plugin updates/saves its view very often and this causes the last added child node to lose its text very often. The text gets replaced by the default child node text.

The steps to reproduce this bug are simple, just work normally for 20 minutes on a Mindmap and you'll encounter this bug constantly on the way.

It doesn't matter if I confirm a new child note with tab or if I click outside the child node. The bug happens no matter how I confirm.

Also, when this bug happens, the heading gets centered as well if my Mindmap is oriented towards the left

MarkMindCkm commented 3 years ago

I'm afraid this is the problem of saving data at the bottom , I call a API method to save data

  this.requestSave()
MarkMindCkm commented 3 years ago

can you provide more detail about this?

MarkMindCkm commented 3 years ago

https://github.com/MarkMindCkm/obsidian-enhancing-mindmap/blob/8bf4200caaaaf3b64beba608fe265f8eac846a33/src/MindMapView.ts#L68