Fix bug on collapse node.

This commit is contained in:
Paulo Gustavo Veiga 2023-01-02 13:29:03 -08:00
parent 9a8c2a0e97
commit 887c799fc9
2 changed files with 5 additions and 1 deletions

View File

@ -445,6 +445,11 @@ class Designer extends Events {
const mindmap = parentModel.getMindmap();
const childModel = mindmap.createNode();
// If node is shink, expand ...
if (topic.areChildrenShrunken()) {
topic.setChildrenShrunken(false);
}
// Create a new node ...
const layoutManager = this._eventBussDispatcher.getLayoutManager();
const result = layoutManager.predict(topic.getId(), null, mousePos);

View File

@ -633,7 +633,6 @@ abstract class Topic extends NodeGraph {
});
}
/** */
areChildrenShrunken(): boolean {
const model = this.getModel();
return model.areChildrenShrunken() && !this.isCentralTopic();