tldraw/apps/examples
David Sheldrick d9ce936ed0
Fix pinch start with toolbar open (#1895)
closes #1893 

Normally when you start a pinch it does the following within a few
frames:

- first finger goes down, begins a drawing gesture, adds a mark to the
undo stack
- second finger goes down, cancels the drawing gesture, bails to the
mark

but when the toolbar is open, it follows the same process without adding
a mark to the undo stack, so that when it bails it bails to the previous
mark.

This PR updates the logic to create a mark ID when setting the mark, and
only bail if the mark id was set on enter.

### Change Type

- [x] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fixes a bug that could trigger undo by accident when closing the style
toolbar via a pinch gesture on mobile.
2023-09-18 10:50:15 +00:00
..
e2e Add snapshot prop, examples (#1856) 2023-09-08 14:48:55 +00:00
src Add snapshot prop, examples (#1856) 2023-09-08 14:48:55 +00:00
package.json Fix pinch start with toolbar open (#1895) 2023-09-18 10:50:15 +00:00
README.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
tsconfig.json Add snapshot prop, examples (#1856) 2023-09-08 14:48:55 +00:00
vercel.json [fix] example routes on vercel (#1391) 2023-05-16 14:37:40 +00:00
vite.config.ts Feature flags rework (#1474) 2023-05-30 13:06:15 +00:00

@tldraw/example