Restrict number of sub childs(depth)
asith-w opened this issue · comments
Is there a method to prevent the generation of new child nodes after a certain depth, such as in the hierarchy: root -> child-child -> child -> child-child?
Alternatively, could users be restricted from creating new nodes by simply pressing and holding the 'tab' key?
(This is because having too many child nodes can make the mind map look confusing like this)
Like this
// ...
before: {
insertSibling() {
if(mei.currentNode.parent.children.length > 100)return false
else return true
},
}
// ...
Thank you very much for the quick reply
However, this it doesn't appear to function as expected. Is there a particular reason for this behavior?
https://codesandbox.io/s/silly-bogdan-q6z2sn?file=/src/index.js
The version you use is too old, before
is not supported.
The version you use is too old,
before
is not supported.
it is same for the 2.0.10 . should i use version 3 ?
The version you use is too old,
before
is not supported.it is same for the 2.0.10 . should i use version 3 ?
Use 3.x if breaking changes don't affect you too much.