Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(gesture): add playground example for basic usage #3038

Merged
merged 6 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/utilities/gestures.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ const gesture = createGesture({

import Basic from '@site/static/usage/v7/gestures/basic/index.md';

In this example, our app listens for gestures on the `ion-content` element. When a gesture movement is started, the `onStart` function is called and a class is added to our `ion-card` to add a colored box shadow. When a gesture movement is detected, the `onMove` function is called and our app prints the current gesture information within the `ion-card`. Finally, when a gesture movement is ended, the `onEnd` function is called and the custom class is removed from our `ion-card`.
sean-perkins marked this conversation as resolved.
Show resolved Hide resolved

<Basic />

## Double Click Gesture
Expand Down
2 changes: 1 addition & 1 deletion static/usage/v7/gestures/basic/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
const onMove = (detail) => {
const { type, currentX, deltaX, velocityX } = detail;
p.innerHTML = `
<div>Type: ${type}</div>
<div>Type: ${type}</div>
<div>Current X: ${currentX}</div>
<div>Delta X: ${deltaX}</div>
<div>Velocity X: ${velocityX}</div>`;
Expand Down