All Versions
1
Latest Version
Avg Release Cycle
-
Latest Release
1228 days ago
Changelog History
Changelog History
-
v2.0.0 Changes
May 06, 2021🚀 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
🆕 New
- The container element and scroll element(s) can now be sent to ASScroll as
HTMLElement
/NodeList
meaning you can pre-select rather than make ASScroll select them again viadocument.querySelector()
(#47) - 🔦 Exposed
maxScroll
,containerElement
,scrollElements
andisHorizontal
- ➕ Added
scrollEnd
event 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
⚡️ Updated
- 👍
ASScroll.scrollPos
andASScroll.smoothScrollPos
have been renamed toASScroll.targetPos
andASScroll.currentPos
respectively. This is to better represent what these values mean ASScroll.targetPos
andASScroll.currentPos
now 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 code- ⚡️
ASScroll.onRaf()
andASScroll.onResize()
have been renamed toASScroll.update()
andASScroll.resize()
respectively ASScroll.enable()
andASScroll.disable()
now accept an object as their parameter so you can pass only the options you need to- The
element
andinnerElement
options have been renamed tocontainerElement
andscrollElements
respectively - 👀 The
disableOnTouch
option has been renamed totouchScrollType
- see docs for more info
🛠 Fixed
- Scrollbar did not match the mouse position when dragging which caused scroll jumps (#12)
- 0️⃣ Using
<script>
tags to include the library meant having to referenceASScroll.default
in order to access the class (#46) - Scroll position and max height values were not previously reporting the correct values on touch devices