Git Product home page Git Product logo

Comments (7)

phphe avatar phphe commented on May 13, 2024 2

Hi @phphe

I have two Trees with cross-tree enabled, and I would like one flat, not the other.

I tried to limit depth to 1 on one of the tree with your code but it doesn't work in this context :
from the behavior it seems the depth limit property is applied to each node instead of being applied to each tree.

I think a real and easy to use tree prop would be more than welcome !

I will think about it

from vue-draggable-nested-tree.

phphe avatar phphe commented on May 13, 2024

@kevindesousa I published 2.0.0. I added 2 hooks isNodeDraggable, isNodeDroppable. You can use isNodeDroppable do that. Please check the demo: https://codepen.io/phphe/pen/KRapQm. The fourth tree meets your requirements.

from vue-draggable-nested-tree.

sdebacker avatar sdebacker commented on May 13, 2024

@phphe I'm afraid there is some more work to do, it's possible to exceed the limit by dragging an item with children into another item.

from vue-draggable-nested-tree.

phphe avatar phphe commented on May 13, 2024

@sdebacker You are right. I havn't any solution now.

from vue-draggable-nested-tree.

phphe avatar phphe commented on May 13, 2024

@sdebacker @kevindesousa check 2.1.1
example https://github.com/phphe/vue-draggable-nested-tree/blob/master/src/examples/MaxLevel.vue

from vue-draggable-nested-tree.

Heziode avatar Heziode commented on May 13, 2024

Codepen of MaxLevel.vue for quick overview.

from vue-draggable-nested-tree.

krodelabestiole avatar krodelabestiole commented on May 13, 2024

Hi @phphe

I have two Trees with cross-tree enabled, and I would like one flat, not the other.

I tried to limit depth to 1 on one of the tree with your code but it doesn't work in this context :
from the behavior it seems the depth limit property is applied to each node instead of being applied to each tree.

I think a real and easy to use tree prop would be more than welcome !

from vue-draggable-nested-tree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.