You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible in the drag code to have the height of the floating panel be larger than the displayed height. This results in a delay when dragging up (making the floating panel smaller) until the calculated height is <= the displayed height.
var drag: some Gesture {
DragGesture(minimumDistance: 0)
.onChanged { value in
handleColor = .activeHandleColor
// Note: There is a bug here where `height` can be set
// larger than the displayed height. This occurs by continuing
// to drag down on the handle after the panel reaches it's max
// height. When that happens subsequent "drag up" operations
// don't cause the panel to shrink immediately, but will
// ultimately snap to the correct height.
height = max(.minHeight, (height ?? 0) + value.translation.height)
}
.onEnded { _ in
handleColor = .defaultHandleColor
}
}
The text was updated successfully, but these errors were encountered:
It is possible in the
drag
code to have theheight
of the floating panel be larger than the displayed height. This results in a delay when dragging up (making the floating panel smaller) until the calculated height is <= the displayed height.See the comment here.
Code:
The text was updated successfully, but these errors were encountered: