6fde34fafd
This PR fixes a few bugs with the "comma as pointer" feature. In tldraw, the `,` key can be used as a replacement for "pointer down" and "pointer up". This is most useful on laptops with trackpads that make dragging inconvenient. (See https://github.com/tldraw/tldraw/issues/2550). Previously, the canvas had to be focused in order for the comma key to work. If you clicked on a menu item and then pressed comma, it would not product a pointer event until you first clicked on the canvas. This is now fixed by moving the listener out of the `useDocumentEvents` and into `useKeyboardShortcuts`. ### Change Type - [x] `minor` — New feature ### Test Plan 1. Click the canvas. 2. Use the comma key to control pointer down / up. 3. Click a shape tool on the toolbar. 4. Move your mouse over the canvas. 5. Press the comma key. It should produce a dot / shape / etc ### Release Notes - Improve comma key as a replacement for pointer down / pointer up. |
||
---|---|---|
.github | ||
.husky | ||
.yarn/patches | ||
apps | ||
assets | ||
config | ||
packages | ||
scripts | ||
.dockerignore | ||
.eslintignore | ||
.eslintplugin.js | ||
.eslintrc.js | ||
.gitignore | ||
.ignore | ||
.prettierignore | ||
.prettierrc | ||
.yarnrc.yml | ||
CHANGELOG.md | ||
CLA.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
lazy.config.ts | ||
lerna.json | ||
LICENSE.md | ||
package.json | ||
README.md | ||
TRADEMARKS.md | ||
vercel.json | ||
yarn.config.cjs | ||
yarn.lock |
tldraw
Welcome to the public monorepo for tldraw. tldraw is a library for creating infinite canvas experiences in React. It's the software behind the digital whiteboard tldraw.com.
- Read the docs and learn more at tldraw.dev.
- Learn about our license.
Local development
To run the local development server, first clone this repo.
Install dependencies:
yarn
Start the local development server:
yarn dev
Open the example project at localhost:5420
.
License
tldraw's source code and distributed packages are provided under the non-commercial tldraw license.
This license does not permit commercial use. If you wish to use tldraw in a commercial product or enterprise, you will need to purchase a commercial license. To obtain a commercial license, please contact us at hello@tldraw.com.
To learn more, see our license page.
Trademarks
The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.
Community
Have questions, comments or feedback? Join our discord or start a discussion.
Contribution
Please see our contributing guide. Found a bug? Please submit an issue.
Contact
Find us on Twitter at @tldraw or email hello@tldraw.com. You can also join our discord for quick help and support.