[BUG] Single Child in ContentScrollSnapHorizontal
Issue #362
new
When using the ContentScrollSnapHorizontal from the context menu, and only having 1 item in the content (removing 4 of the 5 added) causes the panel not to snap correctly.
Steps:
- Create new scene
- Right click Hierarchy
- Choose UI > Extensions > Content Scroll Snap Horizontal
- Delete Position 2 through to Position 5, so only 1 item exists
- Run
- Drag the item
Comments (2)
-
reporter -
Thanks for the feedback @james davies and for the potential fix. I’ll investigate further.
- Log in to comment
Managed to fix this issue using the following code:
All I do is make sure there’s more than 1 item to call the code.
It might not be required to have the filter in the BeginDrag, but if there’s going to be no movement, maybe it shouldn’t call the callback.