Skip to content

Commit ab51d13

Browse files
authored
Set SpineTo stopping threshold to 1.5 (#14)
* Set stop threshold to 1.5 * Add and update
1 parent 1fa3dd1 commit ab51d13

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88
### Changed
9-
- `Composer`: fix #13, user scrolling in Firefox may have the scroll position locked occasionally, in PR [#12](https://github.com/compulim/react-scroll-to-bottom/issues/12)
9+
- `Composer`: fix [#13](https://github.com/compulim/react-scroll-to-bottom/pull/13), user scrolling in Firefox may have the scroll position locked occasionally, in PR [#12](https://github.com/compulim/react-scroll-to-bottom/pull/12)
10+
- `SpineTo`: fix [#10](https://github.com/compulim/react-scroll-to-bottom/pull/10) set stopping threshold from `0.5` to `1.5`, in PR [#14](https://github.com/compulim/react-scroll-to-bottom/pull/14)
1011

1112
## [1.3.0] - 2019-01-21
1213
### Changed

packages/component/src/SpineTo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default class ScrollTo extends React.Component {
7979
const toNumber = to === '100%' ? target.scrollHeight - target.offsetHeight : to;
8080
let nextValue = step(from, toNumber, squareStepper, (Date.now() - start) / 5);
8181

82-
if (Math.abs(toNumber - nextValue) < .5) {
82+
if (Math.abs(toNumber - nextValue) < 1.5) {
8383
nextValue = toNumber;
8484
}
8585

0 commit comments

Comments
 (0)