tldraw/packages/editor
Steve Ruiz 6c7b8febbf
Improve edge scrolling (#3950)
This PR:
- moves the edge scrolling logic into a manager
- adds a new Editor option for `edgeScrollDelay`
- adds a new Editor option for `edgeScrollEaseDuration`

When in a state that would trigger an edge scroll, a delay is added
before the scrolling starts. When scrolling does start, it is eased in
by a certain duration.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features

### Test Plan

1. Drag shapes, resize, or drag select to the edge of the screen
2. The screen should move

- [x] Unit Tests

### Release Notes

- Add a delay and easing to edge scrolling.

---------

Co-authored-by: Mitja Bezenšek <mitja.bezensek@gmail.com>
2024-06-17 14:18:49 +00:00
..
src Improve edge scrolling (#3950) 2024-06-17 14:18:49 +00:00
api-extractor.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-report.md Improve edge scrolling (#3950) 2024-06-17 14:18:49 +00:00
CHANGELOG.md Update CHANGELOG.md [skip ci] 2024-06-11 12:53:15 +00:00
editor.css bookmark: css tweaks (#3955) 2024-06-17 11:39:27 +00:00
LICENSE.md Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
package.json security: enforce use of our fetch function and its default referrerpolicy (#3884) 2024-06-11 13:59:25 +00:00
README.md Update READMEs, add form link (#3741) 2024-05-12 20:48:07 +00:00
setupTests.js React-powered SVG exports (#3117) 2024-03-25 14:16:55 +00:00
tsconfig.json Store-level "operation end" event (#3748) 2024-05-14 09:42:41 +00:00

tldraw/tldraw

Distributions

You can find tldraw on npm here.

Contribution

Please see our contributing guide. Found a bug? Please submit an issue.

License

The tldraw source code and its distributions are provided under the tldraw license. This license does not permit commercial use. To purchase a commercial license or learn more, please fill out this form.

Trademarks

Copyright (c) 2023-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.

Contact

Find us on Twitter/X at @tldraw.

Community

Have questions, comments or feedback? Join our discord or start a discussion. For the latest news and release notes, check out our Substack.