You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to create this and make sure you didn't do it this way on purpose before I did the work to change this. I know exactly what has to change so I can work on it if you would like it changed.
See either vertical or horizontal examples to see what I mean. If you drag an item up in the vertical layout and drop it on the middle of another item it drops below the item. If you drag an item down and drop it on the middle of another item it also ends up below the item. Horizontal has a similar behvior.
However, Vaadin's core default drop will always place the item going the direction it was dragged from when dropping on the middle.
This could have been a conscious decision. If I want it to be different, I can provide my own override, but if you intended it to be the same I can help you out and make a pull request.
Here's the code that would need to change from the drop handler.
// Increase index if component is dropped after or above a previous // component VerticalDropLocation loc = details.getDropLocation(); if (loc == VerticalDropLocation.MIDDLE || loc == VerticalDropLocation.BOTTOM) { idx++; }
The text was updated successfully, but these errors were encountered:
@johndevs
I wanted to create this and make sure you didn't do it this way on purpose before I did the work to change this. I know exactly what has to change so I can work on it if you would like it changed.
See either vertical or horizontal examples to see what I mean. If you drag an item up in the vertical layout and drop it on the middle of another item it drops below the item. If you drag an item down and drop it on the middle of another item it also ends up below the item. Horizontal has a similar behvior.
However, Vaadin's core default drop will always place the item going the direction it was dragged from when dropping on the middle.
This could have been a conscious decision. If I want it to be different, I can provide my own override, but if you intended it to be the same I can help you out and make a pull request.
Here's the code that would need to change from the drop handler.
// Increase index if component is dropped after or above a previous
// component
VerticalDropLocation loc = details.getDropLocation();
if (loc == VerticalDropLocation.MIDDLE || loc == VerticalDropLocation.BOTTOM) {
idx++;
}
The text was updated successfully, but these errors were encountered: