0
votes

I am implementing a drag-and-drop with vue-draggable: https://github.com/SortableJS/Vue.Draggable.

Is there a way to constrain the height of the element when dragging it? Otherwise it looks quite odd whenever doing a drag event when the section literally expands outside the browser itself.

enter image description here

1

1 Answers

1
votes

Vue.Draggable is based on and offering all features of Sortable.js.

As you can see in the documentation, the dragging item has by default the class "sortable-drag", so in your CSS you can use this class to give him some style (including height property).

Here is an example, take a look at the drag component:

https://codesandbox.io/s/vue-draggable-example-jhtyf