ember-drag-sort
ember-drag-sort copied to clipboard
Keep draging element invisible but positioned on drop position
The element being dragged is removed from the list until it is dropped. Is it possible to keep the element invisible but positioned? This would prevent lists items from jumping around too much.
In case anyone else that also came across this, you can always override the CSS:
.dragSortItem.-isDragged {
/* Or use block or flex or whatever that makes sense to keep displaying it. */
display: inherit;
/* Show the element but make it translucent. Set to 0 if you want to make it invisible. */
opacity: 0.5;
}
/* The following paddings need to be fixed if keeping the dragged element positioned
in the list or it would create a massive gap. */
.dragSortItem.-placeholderBefore {
padding-top: 0;
}
.dragSortItem.-placeholderAfter {
padding-bottom: 0;
}