scenee / FloatingPanel

A clean and easy-to-use floating panel UI component for iOS
MIT License
5.61k stars 510 forks source link

backdropAlpha does not change when layout changes without calling invalidateLayout #572

Closed WillBishop closed 2 years ago

WillBishop commented 2 years ago

Description

When moving from compact to a regular size class and switching layouts as detailed in the README.md, the backdropAlpha method is not called until the floating panel is interacted with.

Expected behavior

Upon setting a new layout with the layoutFor newCollection method, backdropAlpha would be called and applied.

Actual behavior

It is not called or applied

Steps to reproduce

Open the Maps example project and slide the floating panel to the .full position, note the dimmed backdrop. Now rotate to landscape, and note how the backdrop is still dimmed, until it is interacted with then snaps to 0.

scenee commented 2 years ago

Thank you for your report. I acknowledged this issue and I'm working on iss-572 branch. I'm going to include a bug fix for this issue on 2.5.5.