UNPKG

tiny-essentials

Version:

Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.

37 lines (22 loc) โ€ข 950 B
## ๐ŸŽ‰ TinyDragger โ€“ Multi-Collision Support! ### โœจ What's New * ๐Ÿ”€ **Multi-collision support** Now supports detecting **multiple collided elements** during dragging. * New methods: * `getAllCollidedElements(x, y)` * `getAllCollidedElementsByRect(rect)` * Internal handling of multiple collisions added via: * `#addCollision(el)` * `#removeCollision()` * ๐Ÿง  Internal helpers for precise collision logic: * `#getCollidedElement(...)` * `#getCollidedElementByRect(...)` * ๐Ÿงผ Clean handling of collision CSS class for all intersecting elements. --- ### ๐Ÿ›  Improvements * Improved method consistency and validation logic. * Full JSDoc annotations for new methods. --- ### ๐Ÿ“Œ Note Backward compatibility preserved. Single-element collision behavior remains by default โ€” multi-collision is **optional**. **Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.12.0...1.12.1