版本发布 8
Fix `hasChanged` in swapEnd event for manualSwap (#108, #111).
Fix dragging handle with nested children (#116)
- Allow scroll on non-handle elements. (#47)
- Fix setting width on swap. (#97) - Fix swapping for items containing SVG elements. (#97) - Fix an item's position when parent elements use CSS `transform: translate`. (#54) - Fix `data-swapy-dragging` when swapping with `manualSwap`.
- Fix click interactions in items. (#101)
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](https://swapy.tahazsh.com/docs/installation) 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](https://swapy.tahazsh.com/docs/swap-event). - **Zero Dependencies** – Swapy is now fully written in pure JS with no external dependencies (without Veloxi). - **New Config Options** – Added [dragOnHold](https://swapy.tahazsh.com/docs/drag-on-hold), [dragAxis](https://swapy.tahazsh.com/docs/drag-axis), and [enabled](https://swapy.tahazsh.com/docs/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](https://swapy.tahazsh.com/docs/no-drag-element) attribute. - **Dynamic Updates** – Use the new [update method](https://swapy.tahazsh.com/docs/update) to refresh your Swapy instance dynamically as the DOM changes. - **Swap Control** – Now you can easily enable or disable swaps dynamically with [onBeforeSwap](https://swapy.tahazsh.com/docs/before-swap-event). - **Custom Drag Styling** – Customize your drag item styles using the new [[data-swapy-dragging]](https://swapy.tahazsh.com/docs/style-dragging-item) CSS selector. - **Easier Framework Integration** – New [utility functions](https://swapy.tahazsh.com/docs/framework-react-dynamic) 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.](https://swapy.tahazsh.com/license) I hope you find these updates useful! As always, feel free to reach out with feedback or questions.
- Clean up event listeners when swapping with `manualSwap`. (#70)
- Fix `hasChanged` in swapEnd event (#58)