tz-better-scroll-observe-dom
v2.5.5
Published
Dynamic recalculating container's size for BetterScroll
Downloads
16
Maintainers
Readme
@better-scroll/observe-dom
recaculating BetterScroll's scrollHeight or scrollWidth by MutationObserver
, with this, you don't care when BetterScroll's scrollHeight or scrollWidth have changed. Plugin has done it for you.
if current browser does not surpport
MutationObserver
, it will fallback tosetTimeout
in recursion
Usage
import BScroll from 'tz-better-scroll-core'
import ObserveDom from 'tz-better-scroll-observe-dom'
BScroll.use(ObserveDom)
const bs = new BScroll('.wrapper', {
observeDOM: true
})