Version 6.1.0 is out !
New Features
- the new
getWindowScrollermethod allows you to retrieve the element that scrolls the window - the new
getFramesTimemethod allows you to retrieve the value ofuss._framesTime - the new
calcFramesTimesmethod allows you to recalculate theuss._framesTimevalue - the new
containScrollparameter ofscrollXTo,scrollYTo,scrollXByandscrollYByallows you to limit the range of scrolling of a container between 0 and its maxScrollX/maxScrollY getAllScrollableParentsnow returns the same array of parents used byscrollIntoViewandscrollIntoViewIfNeededcalcXScrollbarsDimensionsnow support all instances of Element instead of only SVGElements and HTMLElementscalcYScrollbarsDimensionsnow support all instances of Element instead of only SVGElements and HTMLElementscalcScrollbarsDimensionsnow support all instances of Element instead of only SVGElements and HTMLElements- scrollable parents of Elements are now cached (10x faster)
- the new
getBrowserRefreshRatemethod of theDev-Helperslibrary allows you to retrieve the browser's fps count during testing - the same stepLengthCalculator obtained from one of the methods of the
Ease-Functionslibrary can now be used with multiple containers setStepLengthCalculatorcan now reset the default xStepLengthCalculator and yStepLengthCalculator of a container if no value is passed- the calculation time and reliability of
uss._framesTimehas been greatly improved (from a few seconds down to 33ms at most) - improved parsing of default error/warning loggers for values that are not instances of Element
- bugfixes and performance improvements
Changes compared to the previous version
- if the
initparameter is passed tohrefSetup, now the propagation of the event is not stopped by default (the event is now the 3rd input parameter of theinitmethod) - the alignment of
scrollIntoViewIfNeededis now always applied, even if the passed element is already into view - regexes used by the API are now global constants
- the scrollable parent of
document.documentElementis nownullinstead ofwindow - API caches are now reset to
undefinedinstead ofnullafter a resize event
Here you can find the full Universal Smooth Scroll 6.1.0 project: https://github.com/users/CristianDavideConte/projects/1
For any bug or feature request don't hesitate to contact me.
Have a nice day :)