Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Refactor layoutAttributesForElements to fix rare rendering glitches #122

Merged
merged 3 commits into from
Aug 5, 2019

Conversation

zenangst
Copy link
Owner

@zenangst zenangst commented Aug 5, 2019

  • Set default padding to 1 if itemsPerRow is not set
  • Add additional padding to the visible rectangle to avoid rare rendering issues with larger collections

- Set default padding to 1 if `itemsPerRow` is not set
- Add additional padding to the visible rectangle to avoid rare rendering issues with larger collections
@zenangst zenangst requested a review from christoff-1992 August 5, 2019 12:21
@zenangst zenangst changed the title Improve layoutAttributesForElements Refactor layoutAttributesForElements to fix rare rendering glitches Aug 5, 2019
@@ -354,6 +354,8 @@
offset = itemSize.height
rect.origin.y -= offset
rect.size.height += offset * 2
@unknown default:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo nice 👍

Copy link
Collaborator

@christoff-1992 christoff-1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@zenangst zenangst force-pushed the fix/rare-rendering-issues branch from 651c9b5 to 7d1859f Compare August 5, 2019 12:40
@zenangst zenangst merged commit d2810ea into master Aug 5, 2019
@zenangst zenangst deleted the fix/rare-rendering-issues branch August 5, 2019 12:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants