Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Add comment for checkSwipe()
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Jul 19, 2016
1 parent 09bcf33 commit ee5081f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion js/actions/webviewActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ const webviewActions = {
webview.showDefinitionForSelection()
}
},
canSwipe: function (back) {

/**
* Check two-finger gesture swipe back/forward ability
* @param {bool} back - true for back, false for forward
*/
checkSwipe: function (back) {
const webview = getWebview()
if (webview) {
if (back) {
Expand Down
4 changes: 2 additions & 2 deletions js/components/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ class Main extends ImmutableComponent {
deltaY = deltaY + e.deltaY
time = (new Date()).getTime() - startTime
if (deltaX > 0) {
webviewActions.canSwipe(false)
webviewActions.checkSwipe(false)
} else if (deltaX < 0) {
webviewActions.canSwipe(true)
webviewActions.checkSwipe(true)
}
}
})
Expand Down

0 comments on commit ee5081f

Please sign in to comment.