Skip to content

Commit

Permalink
Considering RTL for velocity too
Browse files Browse the repository at this point in the history
  • Loading branch information
fermoya committed Jul 20, 2022
1 parent 6f9c413 commit 4ddc04c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Example/SwiftUIPagerExample/he.lproj/LaunchScreen.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion Sources/SwiftUIPager/PagerContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ extension Pager.PagerContent {

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

guard allowsMultiplePagination else {
var newPage = currentPage
Expand Down

0 comments on commit 4ddc04c

Please sign in to comment.