Created
March 5, 2020 13:33
-
-
Save sueLan/d3d936da495fb8535685c267ab73f096 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const timestamp = e.timeStamp; | |
let visibleLength = this._selectLength(e.nativeEvent.layoutMeasurement); | |
let contentLength = this._selectLength(e.nativeEvent.contentSize); | |
let offset = this._selectOffset(e.nativeEvent.contentOffset); | |
let dOffset = offset - this._scrollMetrics.offset; | |
// ... | |
this._scrollMetrics = { | |
contentLength, | |
dt, | |
dOffset, | |
offset, | |
timestamp, | |
velocity, | |
visibleLength, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment