Skip to content

Commit

Permalink
add extra options to touch options
Browse files Browse the repository at this point in the history
  • Loading branch information
hypebright committed Mar 24, 2024
1 parent 1517bcf commit 120c93e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Also, `f7Radio()` inherits from `f7List()` styling parameters such as `inset`, `
`f7Radio()`. Improved choice with title, subtitle, ...
- `f7Sheet()` gains new `options` parameter to allow passing more configuration. See https://framework7.io/docs/sheet-modal#sheet-parameters.
- `f7Picker()` has new `options` parameter.
- Added `tapHoldPreventClicks`, `touchClicksDistanceThreshold`, `mdTouchRipple` to `f7Page()` touch options
- Fix various issues in documentation.

# shinyMobile 1.0.1
Expand Down
9 changes: 8 additions & 1 deletion R/f7Page.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@
#' }
#' Touch module options \url{https://framework7.io/docs/app#param-touch}:
#' \itemize{
#' \item \code{touchClicksDistanceThreshold}: Distance threshold (in px) to prevent short swipes.
#' So if tap/move distance is larger than this value then "click" will not be triggered.
#' \item \code{tapHold}: It triggers (if enabled) after a sustained, complete touch event.
#' By default it is enabled. See \link{f7TapHold} for usage.
#' \item \code{tapHoldDelay}: Determines how long (in ms) the user must hold their tap before the taphold event is fired on the target element.
#' Default to 750 ms.
#' \item \code{tapHoldPreventClicks}: When enabled (by default), then click event will not be fired after tap hold event.
#' \item \code{iosTouchRipple}: Default to FALSE. Enables touch ripple effect for iOS theme.
#' \item \code{mdTouchRipple}: Default to TRUE. Enables touch ripple effect for MD theme.
#' }
#' Navbar options \url{https://framework7.io/docs/navbar#navbar-app-parameters}:
#' \itemize{
Expand Down Expand Up @@ -62,9 +66,12 @@ f7Page <- function(
filled = FALSE,
color = "#007aff",
touch = list(
touchClicksDistanceThreshold = 5,
tapHold = TRUE,
tapHoldDelay = 750,
iosTouchRipple = FALSE
tapHoldPreventClicks = TRUE,
iosTouchRipple = FALSE,
mdTouchRipple = TRUE
),
iosTranslucentBars = FALSE,
navbar = list(
Expand Down

0 comments on commit 120c93e

Please sign in to comment.