fix boundary case for responding to horizontal scroll request
This commit is contained in:
parent
12612670f6
commit
6ed4157c51
|
@ -732,11 +732,11 @@
|
||||||
(if (positive? hpixels-per-scroll)
|
(if (positive? hpixels-per-scroll)
|
||||||
(cond
|
(cond
|
||||||
[(or (and (eq? bias 'start) (fw . > . iw))
|
[(or (and (eq? bias 'start) (fw . > . iw))
|
||||||
(and (fw . < . iw) (localx . < . x))
|
(and (fw . <= . iw) (localx . < . x))
|
||||||
(and (fw . > . iw) (not (eq? bias 'end)) (localx . < . x)))
|
(and (fw . > . iw) (not (eq? bias 'end)) (localx . < . x)))
|
||||||
(->long (/ localx hpixels-per-scroll))]
|
(->long (/ localx hpixels-per-scroll))]
|
||||||
[(or (and (eq? bias 'end) (fw . > . iw))
|
[(or (and (eq? bias 'end) (fw . > . iw))
|
||||||
(and (fw . < . iw) ((+ x iw) . < . (+ localx fw)))
|
(and (fw . <= . iw) ((+ x iw) . < . (+ localx fw)))
|
||||||
(and (fw . > . iw) (not (eq? bias 'start)) ((+ localx fw) . > . (+ x iw))))
|
(and (fw . > . iw) (not (eq? bias 'start)) ((+ localx fw) . > . (+ x iw))))
|
||||||
(+ (->long (/ (+ localx (- fw iw)) hpixels-per-scroll)) 1)]
|
(+ (->long (/ (+ localx (- fw iw)) hpixels-per-scroll)) 1)]
|
||||||
[else cx])
|
[else cx])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user