52inc / Pulley

A library to imitate the iOS 10 Maps UI.
https://cocoapods.org/pods/Pulley
MIT License
2.02k stars 265 forks source link

fix: panel mode closed state has visible drawer part #410

Closed MarkKazakov closed 3 years ago

MarkKazakov commented 3 years ago

Description

When using pulley in panel display mode, in closed position the drawer is still visible because of the bounceOverflowMargin that is added to drawer's height in panel mode.

By removing bounceOverflowMargin from the height calculation in syncDrawerContentViewSizeToMatchScrollPositionForSideDisplayMode This is no longer an issue

Fixes # (issue) https://github.com/52inc/Pulley/issues/409

Type of change

How Has This Been Tested?

To reproduce the issue call setDrawerPosition with .closed in panel mode. Expected result - no visible drawer Actual result - part of the drawer is visible with height equal to bounceOverflowMargin

With the fix only panel mode is affected and the drawer is hidden as expected in .closed position

Checklist:

iGeX commented 3 years ago

I've expirenced another panel mode bug in my converted Xamarin project, maybe it reproduces also in original project. When I applied your fix, overlapping part has gone, but when drawer position changes it still has some twitchy animation in the end (jumping some amount of pixels down and backwards), I suppose it is also related to bouncingOverlowMargin.

ulmentflam commented 3 years ago

@iGeX and @MarkKazakov I made an alternate fix on this branch. Let me know if that fixes the issues with the twitchy animation when the drawer position changes.