Repository navigation
fix(labels): keep a label's position and offset upright on a turned map - #3510
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI read the full diff, the changed render code in context, the area-label helpers, and the camera projection. I could not build or run the tests in this environment (no shell), so the findings below come from reading the code. Bugs
Security
Performance
Quality
AGENTS.md
No inline comments were posted. All findings above are nits or confidence notes, so I grouped them here rather than posting them one by one. Prior reviews: Change sizeCompared with the base branch: the whole PR against
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
On a turned or tilted map, a label class's offset pointed a different way depending on the place the label took: it turned with the map at a point's places, at a polygon's label without Try other places inside and around the polygon, and at its first places inside, but stayed upright at the places round a polygon and further inside it. The class's position turned the same way, so Above put a point's name beside it on a map turned 90 degrees.
Labels are placed in a north-up frame and then moved into the view shown. Position and offset were added in that frame, before the move. They are now added in the view shown, so they are the screen's at every place, as on a map north up.
Testing
crates/render/src/polygon_labels_tests/offsets.rs. Run againstmain, the position and offset ones fail and the one pinning the square-to-a-line case, which doesn't change, passes. Two more pin a point out of a turned view and out of the far side of a tilted view that keeps its offset label.cargo nextest run -p rustgis-render: 1196 passed, 1 skipped.cargo fmt --all --checkandcargo clippy -p rustgis-render --all-targets -- -D warnings: clean.Surfaces
The change is in
rustgis-render, so it reaches every place that draws a turned or tilted map: the desktop app, the browser, the touch interface, the command line, Python and turned map frames in layouts. No command, parameter or setting is added or changed, so the ribbon, command search, the Assistant and MCP, plugins and undo are unaffected.UI evidence
Before (left) and after (right), on a map turned 90 degrees.
Cities with their position set to Above:
Countries with an offset of 30 points to the right:
Related issue
Closes #3508
Summary by CodeRabbit