Releases: TahaSh/swapy
Releases · TahaSh/swapy
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
I’m excited to announce that v1.0.0 is a complete rewrite of Swapy, with lots of new features, performance improvements, and bug fixes.
What's New:
- New Full Docs – Check out the new, detailed documentation to learn everything you need about Swapy.
- Minor API Tweaks – Some event objects have been updated for better consistency and clarity. Check out the events section to learn about them.
- Zero Dependencies – Swapy is now fully written in pure JS with no external dependencies (without Veloxi).
- New Config Options – Added dragOnHold, dragAxis, and enabled to give you more control over your setup.
- Non-Draggable Areas – You can now specify areas in your items that are not draggable. Check out no-drag attribute.
- Dynamic Updates – Use the new update method to refresh your Swapy instance dynamically as the DOM changes.
- Swap Control – Now you can easily enable or disable swaps dynamically with onBeforeSwap.
- Custom Drag Styling – Customize your drag item styles using the new [data-swapy-dragging] CSS selector.
- Easier Framework Integration – New utility functions to seamlessly integrate with frameworks and dynamically add/remove items.
- Dual Licensing – I’ve switched to a dual license model: GPLv3 and Commercial. Read more about the licensing.
I hope you find these updates useful! As always, feel free to reach out with feedback or questions.
v0.4.2
v0.4.1
v0.4.0
This version supports auto-scrolling while dragging.
Features
autoScrollOnDrag
(#73)
Enabling autoScrollOnDrag
in Swapy's config options will cause the page or container to auto-scroll when dragging an item near the edge.
createSwapy(container, {
autoScrollOnDrag: true
})
Add hasChanged
to swapEnd event (#58)
The swapEnd event object now includes a new parameter, hasChanged
, which indicates whether any items were swapped during the drag session.
swapy.onSwapEnd(({ data, hasChanged }) => {
console.log(hasChanged);
console.log('end', data);
})