Skip to content

Commit 4ddc04c

Browse files
committed
Considering RTL for velocity too
1 parent 6f9c413 commit 4ddc04c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Sources/SwiftUIPager/PagerContent.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ extension Pager.PagerContent {
417417

418418
var dragResult: (page: Int, increment: Int) {
419419
let currentPage = self.currentPage(sensitivity: sensitivity.value)
420-
let velocity = -self.draggingVelocity
420+
let velocity = -self.draggingVelocity * (Locale.current.isRightToLeft ? -1 : 1)
421421

422422
guard allowsMultiplePagination else {
423423
var newPage = currentPage

0 commit comments

Comments
 (0)