Merge pull request #3016 from matrix-org/travis/scroll-breadcrumbs

Translate scroll movement if the deltaX is the same as the threshold
This commit is contained in:
Travis Ralston 2019-05-22 10:24:43 -06:00 committed by GitHub
commit 6368566887
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,7 +129,7 @@ export default class IndicatorScrollbar extends React.Component {
// the harshness of the scroll behaviour. Should be a value between 0 and 1. // the harshness of the scroll behaviour. Should be a value between 0 and 1.
const yRetention = 1.0; const yRetention = 1.0;
if (Math.abs(e.deltaX) < xyThreshold) { if (Math.abs(e.deltaX) <= xyThreshold) {
// noinspection JSSuspiciousNameCombination // noinspection JSSuspiciousNameCombination
this._scrollElement.scrollLeft += e.deltaY * yRetention; this._scrollElement.scrollLeft += e.deltaY * yRetention;
} }