-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maintain node level #84
Comments
refer max level: https://github.com/phphe/vue-draggable-nested-tree/blob/master/src/examples/MaxLevel.vue |
can you provide an example more explicity? or add comments to https://github.com/phphe/vue-draggable-nested-tree/blob/master/src/examples/MaxLevel.vue |
// may like this
ondrag(node) {
th.depthFirstSearch(this.originalData, (childNode) => {
if (childNode === node) {
return 'skip children'
}
if (node.type === 'activity') {
this.$set(childNode, 'droppable', childNode.type === 'module')
} else {
this.$set(childNode, 'droppable', false)
}
})
}, |
This is what i have....
|
@daveKoala import * as th from 'tree-helper' |
Hi @phphe
i have a structure no more than 2 levels deep ( Module and Activities ).
I need to keep any Module at the root level and be able to reorder them.
Activities can be reordered and moved between Modules - but can not be promoted to root level with Modules
Screen shots:
This is the structure i am looking to keep
This is wrong, Modules and Activities sharing node levels
My data structure is:
Many thanks in advance
DC
The text was updated successfully, but these errors were encountered: