Fix the positive-edge case of scroll-offset computation

This commit is contained in:
Tony Garnock-Jones 2015-10-29 15:58:11 -04:00
parent dd498ab627
commit d3ca36beaf
1 changed files with 1 additions and 2 deletions

View File

@ -807,8 +807,7 @@
'()))
(define (compute-offset pos viewport limit)
(define half-viewport (/ viewport 2))
(min (max 0 (- pos half-viewport)) (- limit half-viewport)))
(min (max 0 (- pos (/ viewport 2))) (- limit viewport)))
(define ((update-scroll-offset-from-player-position p) s)
(define player-positions (matcher-project/set/single (patch-added p) position-projection))