Releases: chasegiunta/wrap-aware
1.3.1
- Fix performance issue
Full Changelog: 1.3.0...1.3.1
1.3.0
1.2.1
- Fix wrapping detection for reverse-wrapped items when using
align-items: flex-end
Full Changelog: 1.2.0...1.2.1
1.2.0
- Fix issue preventing wrap detection when flex items have unequal heights
- Several performance optimizations:
-
Added debouncing: The ResizeObserver callback is now debounced with a 16ms delay (approximately matching a 60fps refresh rate), which reduces the frequency of calculations during resize operations.
-
Added dimension caching: The library now stores the previous dimensions of each flex container and skips recalculations if the dimensions haven't changed, which avoids unnecessary processing.
-
Reduced layout thrashing: Added rect caching to avoid multiple costly calls to getBoundingClientRect() for the same elements during a single calculation cycle.
-
Optimized DOM operations: Added the updateAttributeEfficiently helper function which only modifies attributes when necessary, reducing DOM updates and potential reflows.
-
Improved wrap-reverse detection: The algorithm for grouping items by their position now looks for nearest matches within a tolerance range, which is more efficient than the previous approach.
-
Batch calculations: Measurements are now batched together to minimize the number of reflows caused by reading layout properties.
-
Full Changelog: 1.1.0...1.2.0
1.1.0
- Add support for detection when wrapping flex items in the reverse direction
Full Changelog: v1.0.6...1.1.0
1.0.6
- Fix CJS require
1.0.5
Initial Release