Hello,
Firstly, I'd like to thank you for developing and maintaining this fantastic library. It has significantly simplified the implementation of drag-to-swap functionality in my projects.
Issue:
Currently, the library moves every element between the initial and final positions when an element is dragged and dropped. However, in my use case, I need an option to swap only the initial and final positions, without affecting the intermediate elements. This feature would provide greater flexibility and control over the layout behavior during drag-and-drop operations.
Example:
Here's an illustration of the current behavior and the desired behavior:
Current Behavior:
Initial: [A, B, C, D, E]
Drag 'A' to position of 'D'
Result: [B, C, D, A, E]
Desired Behavior:
Initial: [A, B, C, D, E]
Drag 'A' to position of 'D'
Result: [D, B, C, A, E]
Proposal:
I propose adding an option or method to enable swapping only the initial and final positions of the dragged element. This could be a configuration setting or a specific method call.
Benefits:
Enhanced flexibility for different use cases.
Greater control over the layout behavior during drag-and-drop.
More intuitive behavior for certain user interfaces.
Additional Context:
If needed, I can assist with testing the new feature or providing further examples of how this functionality could be utilized.
Thank you for considering this feature request. I look forward to your response and am hopeful that this can be incorporated into the library.
Best regards,
Danivalldo