Giter Club home page Giter Club logo

Comments (5)

jafesch avatar jafesch commented on July 28, 2024 5

I figured it out myself. You can just pass the animation time via options and don't use <transition-group>

<draggable v-model="items" :options="{ animation: 200 }">

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 28, 2024 1

Hi @szmarci , this is the behaviour of transition-group used in conjunction with draggable.
An another option of transition is to use animation Sortable option.

from vue.draggable.

szmarci avatar szmarci commented on July 28, 2024

Hi @David-Desmaisons , thanks for getting back to me. Yeah, I checked the animation property of sortable, but it was a little different. It already start animating while you were dragging it, whereas with transition-group it worked after you have dropped the item. Do you know a way of achieving this former behaviour with sortable's animation?

Also, I found another thing, I'm not sure if I should open a new issue or not, but here it is:
Based on this fiddle: http://jsfiddle.net/bvjfa9xk/2/
If you empty a sublist completely, you can no longer drag back elements to it. I assume it is normal behaviour, but is there a way to get around it?
Thanks!

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 28, 2024

For the second question, you can set a minheight on the div where you can drop element, so you can drop element when the collection is empty see jsfiddle examples for this.

For the animation, there migth be a way tuning sortbale animation, but I did not spend enought time to find it.

from vue.draggable.

jafesch avatar jafesch commented on July 28, 2024

Hi @szmarci. Did you find a solution to create the same animation behavior as sortable has. I mean that the transition animation only happens once at the beginning.

from vue.draggable.

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.