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

Viewport jumps after toggling the sidebar #1468

Closed
jleedev opened this issue Jun 20, 2024 · 0 comments
Closed

Viewport jumps after toggling the sidebar #1468

jleedev opened this issue Jun 20, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jleedev
Copy link

jleedev commented Jun 20, 2024

Description

After toggling the sidebar, the map viewport jumps.

Screenshots

Screen.recording.2024-06-19.21.16.47.webm

Version

2.3.1

What browser are you seeing the problem on? What version are you running?

Chrome 126

The OS you're using

Chrome OS 126

Steps to reproduce

  1. Press ` to toggle the sidebar
  2. Cause the map to redraw itself, for instance point the mouse at a map feature to highlight it, or pan slightly.

The browser URL at the time you encountered the bug

https://rapideditor.org/edit#map=20.00/42.57717/-70.71177&background=Bing&datasets=fbRoads,msBuildings

The auto-detected useragent string for your browser (leave blank if you're manually filling this form out)

No response

@bhousel bhousel added the bug Something isn't working label Jun 20, 2024
bhousel added a commit that referenced this issue Jul 26, 2024
summary:
- dragging sidebar resizer works
- toggling in/out by clicking resizer works
- persist sidebar preferences to local storage (closes #1479)
- fix "viewport jumps after toggling sidebar" (closes #1468)
  (though the resizing is still jerky as it fights with map draws and I'd like to improve that.)
- a few places rename systems to use shortnames (e.g. photosystem -> photos)
- we don't need utilFastMouse anymore

todo:
- I left the sidebar resizer red - need to style it nicer
- Remove that "Inspect" button?  It's unnecessary with a proper resizer
- ui.resize doesn't pan the map completely correctly to account for the resize
  I divided pan amount by half, expecting that the map will grow on both sides (from center) now
  But this still isn't totally right - the math needs to be based on main-map dims not sidebar dims.
  (for fun, this effect of weird pan is worse when the map is rotated)
@bhousel bhousel added this to the v2.4 milestone Jul 26, 2024
@bhousel bhousel self-assigned this Jul 26, 2024
@bhousel bhousel mentioned this issue Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants