This release includes some breaking changes - see "Updated" below.
- Removed support for IE11 and updated targeted browser compatibility, resulting in a package size reduction of over 30%
- Added JSDoc to enable auto-completion and type-hinting. This is also used to generate accurate README documentation
- The check to determine screen refresh rate only runs briefly after initialising ASScroll, stopping continuous calls to
performance.now()thus slightly increasing performance
- The container element and scroll element(s) can now be sent to ASScroll as
HTMLElement/NodeListmeaning you can pre-select rather than make ASScroll select them again viadocument.querySelector()(#47) - Exposed
maxScroll,containerElement,scrollElementsandisHorizontal - Added
scrollEndevent which fires when the lerped scroll position reaches its target - Added example to show how ASScroll works with PJAX navigation
- Added example showing ASScroll + DOM/WebGL syncing
ASScroll.scrollPosandASScroll.smoothScrollPoshave been renamed toASScroll.targetPosandASScroll.currentPosrespectively. This is to better represent what these values meanASScroll.targetPosandASScroll.currentPosnow return positive values rather than the negative Y translate value used to transform the scroll element(s). This should make it more intuitive when using these values in your own codeASScroll.onRaf()andASScroll.onResize()have been renamed toASScroll.update()andASScroll.resize()respectivelyASScroll.enable()andASScroll.disable()now accept an object as their parameter so you can pass only the options you need to- The
elementandinnerElementoptions have been renamed tocontainerElementandscrollElementsrespectively - The
disableOnTouchoption has been renamed totouchScrollType- see docs for more info
- Scrollbar did not match the mouse position when dragging which caused scroll jumps (#12)
- Using
<script>tags to include the library meant having to referenceASScroll.defaultin order to access the class (#46) - Scroll position and max height values were not previously reporting the correct values on touch devices