Skip to content

Commit 9b45ef5

Browse files
authored
Fixed using swipe threshold from configuration
2 parents 30f1b5d + 132781c commit 9b45ef5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/CardStack/CardView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct CardView<Direction, Content: View>: View {
6060

6161
private func swipeDirection(_ geometry: GeometryProxy) -> Direction? {
6262
guard let direction = direction(degree) else { return nil }
63-
let threshold = min(geometry.size.width, geometry.size.height) / 2
63+
let threshold = min(geometry.size.width, geometry.size.height) * configuration.swipeThreshold
6464
let distance = hypot(translation.width, translation.height)
6565
return distance > threshold ? direction : nil
6666
}

0 commit comments

Comments
 (0)