simple-scroll-snap
simple-scroll-snap copied to clipboard
Bugfix: Adding a slide after initialization causes slide anchor positions to misalign when InfiniteScrolling is enabled
There is a bug with the 'Dynamic Content' example in the Unity package. When I enable InfiniteScrolling and try to add a slide after initialization, the selected slide is no longer centered.
I believe I found the issue is due to a modification of anchorPosition after the InfiniteScrolling handler function is called, which itself depends on the Panels' anchorPositions. This will a result in a misalignment of anchorPositions. This can be easily solved by avoiding offsetting the Panel in SetUp() as doing so does not appear to cause any adverse affects at least in the examples provided.