Skip to content

Commit

Permalink
Fix a broken table on project website
Browse files Browse the repository at this point in the history
saket committed Jul 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 27c517d commit dc968a3
Showing 2 changed files with 8 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/zoomable/index.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ A `Modifier` for handling pan & zoom gestures, designed to be shared across all
- Haptic feedback for over/under zoom
- Compatibility with nested scrolling
- Click listeners
- [Keyboard and mouse shortcuts](#keyboard-and-mouse-shortcuts)
- [Keyboard and mouse shortcuts](#keyboard-shortcuts)

### Installation

@@ -66,7 +66,7 @@ Image(
### Click listeners
For detecting double clicks, `Modifier.zoomable()` consumes all tap gestures making it incompatible with `Modifier.clickable()` and `Modifier.combinedClickable()`. As an alternative, its `onClick` and `onLongClick` parameters can be used.

```kotlin
```kotlin hl_lines="3-4"
Modifier.zoomable(
state = rememberZoomableState(),
onClick = { … },
@@ -109,7 +109,7 @@ Text(
)
```

### Keyboard and Mouse shortcuts
### Keyboard shortcuts

`ZoomableImage()` can observe keyboard and mouse shortcuts for panning and zooming when it is focused, either by the
user or using a `FocusRequester`:
15 changes: 5 additions & 10 deletions docs/zoomableimage/index.md
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ A _drop-in_ replacement for async `Image()` composables featuring support for pa
- Haptic feedback for over/under zoom
- Compatibility with nested scrolling
- Click listeners
- [Keyboard and mouse shortcuts](#keyboard-and-mouse-shortcuts)
- [Keyboard and mouse shortcuts](#keyboard-shortcuts)

### Installation

@@ -195,28 +195,22 @@ For detecting double clicks, `ZoomableImage` consumes all tap gestures making it

The default behavior of toggling between minimum and maximum zoom levels on double-clicks can be overridden by using the `onDoubleClick` parameter:

=== "Coil"
=== "Coil" hl_lines="3"
```kotlin
ZoomableAsyncImage(
model = "https://example.com/image.jpg",
onDoubleClick = { state, centroid -> … },
)
```
=== "Glide"
```kotlin
```kotlin hl_lines="3"
ZoomableGlideImage(
model = "https://example.com/image.jpg",
onDoubleClick = { state, centroid -> … },
)
```

```kotlin
Modifier.zoomable(
onDoubleClick = { state, centroid -> … }
)
```

### Keyboard and Mouse shortcuts
### Keyboard shortcuts

`ZoomableImage()` can observe keyboard and mouse shortcuts for panning and zooming when it is focused, either by the user or using a `FocusRequester`:

@@ -247,6 +241,7 @@ LaunchedEffect(Unit) {

By default, the following shortcuts are recognized. These can be customized (or disabled) by passing a custom `HardwareShortcutsSpec` to `rememberZoomableState()`.

| | Android |
|-----------|--------------------|
| Zoom in | `Control` + `=` |
| Zoom out | `Control` + `-` |

0 comments on commit dc968a3

Please sign in to comment.