flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
594 stars 40 forks source link

fix getBoundsCheckedContentOffset when bounds is bigger than contentSize #317

Closed michaelknoch closed 3 years ago

michaelknoch commented 3 years ago

Fixes #

Type of change:

Motivation (current vs expected behavior)

Our UIScrollview implementation currently jumps to the end of the list when onPan gets called and the contentSize dimensions are smaller than the bounds dimensions of the scrollview.

screeen

https://user-images.githubusercontent.com/5617793/107209784-914b2800-6a03-11eb-9d28-c69190512963.mp4

Please check if the PR fulfills these requirements

codecov[bot] commented 3 years ago

Codecov Report

Merging #317 (c72668c) into master (0e44ce4) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #317      +/-   ##
==========================================
+ Coverage   51.42%   51.46%   +0.03%     
==========================================
  Files          87       87              
  Lines        2872     2874       +2     
==========================================
+ Hits         1477     1479       +2     
  Misses       1395     1395              
Impacted Files Coverage Δ
Sources/UIScrollView.swift 88.23% <100.00%> (+0.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0e44ce4...c72668c. Read the comment docs.