Social bar position is a click-toggle, not a drag — the drag-snap misbehaved for shaky hands (snapped up but wouldn't come back down; jitter around the deadzone). Clicking the bar now flips it top/bottom via ToggleSocialBarPosition; SocialBarSnap and its units removed — 153 tests passing, 0 warnings
This commit is contained in:
@@ -263,19 +263,3 @@ public static class SocialServiceIcons
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Direction-based snap for the social bar drag (preview): a drag toward the top
|
||||
/// edge snaps the bar to the top, toward the bottom snaps it to the bottom — the
|
||||
/// bar is never left mid-screen. Returns null inside the deadzone so a drag that
|
||||
/// hasn't committed to a direction doesn't flip the bar.
|
||||
/// </summary>
|
||||
public static class SocialBarSnap
|
||||
{
|
||||
public static SocialBarPosition? Decide(double deltaY, double deadzone = 6)
|
||||
{
|
||||
if (deltaY <= -deadzone) return SocialBarPosition.Top;
|
||||
if (deltaY >= deadzone) return SocialBarPosition.Bottom;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user