de55259c92
In some cases (when you clicked close to the current viewport area) the minimap would not change the camera position. This is because the `clampedPoint` calculation would offset the clicked position slightly and then the `clampedPoint` would land inside the currently viewport. With this change we will treat every click outside of the viewport (but still within allowed bounds) as a change that requires use to change the camera position. Before https://github.com/tldraw/tldraw/assets/2523721/ded202d1-94d7-4b40-ba77-45d283e4fa60 After https://github.com/tldraw/tldraw/assets/2523721/2ccee77d-ec0e-4997-b51d-c14676657a94 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [x] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know ### Test Plan 1. Use minimap in various ways to make sure it still works correctly. The change targets the `pointerDown` event, but I did also refactor one method that is also used by double click so it makes sense to test that as well. Make sure you are not double clicking since we don't use the same logic there. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Fixes clicking on the minimap when we clicked just slightly outside of the current viewport. |
||
---|---|---|
.. | ||
assets | ||
dotcom-shared | ||
editor | ||
namespaced-tldraw | ||
state | ||
store | ||
tldraw | ||
tlschema | ||
tlsync | ||
utils | ||
validate |