Skip to content

insertSibling 无法插入在节点的前面 #329

@long-woo

Description

@long-woo

非常感谢,这是一个很酷脑图库!

Describe the bug
当 direction 设置 RIGHT 时,调用 insertSibling 无法插入在节点的前面。

看了一下代码是这里有个条件

} else if (!nodeObj.parent?.parent && nodeObj.parent?.children?.length === 1) {

To Reproduce

Expected behavior
direction 为 SIDE 时,才执行这个条件。

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions