Repository navigation
Closed
Description
Follow-up to #2660 (#2581 part 2), which merged before its last review round was pushed. The CodeRabbit review on 8ec911b and the review passes after it found these. Each one is fixed and tested on a branch, ready for a PR.
Bugs
- A locked scale bar takes
"textSize": null.ElementKind::null_resetscountstextSizeonly for legends, solayout.updatewith"textSize": nullon a locked scale bar passes the lock and gives it back 8 pt. It should be refused, as for a legend, unless the same command gives"locked": false. - A scale bar moved with
xoryisn't measured. Its labels can be moved off the page without the in-app notice; only the export reports it. Resizing (w/h), its size, units and divisions are already measured. - A short scale bar's end label can overlap its first at a large size, with no notice. Both labels are always drawn, and the box check looks only at the end label's right side. Example: 12 pt in a 48 px box.
- A grid label larger than a short frame is drawn and then cut by the frame.
kept_labelschecks a label's room along its edge but not across the frame. Example:labelSize100 on a frame about 10 mm tall.
Publication
- The scale box isn't re-measured when its frame's centre or map changes. The text under the bar can name
{center}and{map}, and the bar's ground length follows the map, but only a change ofscaleorwre-measures the box.
Smaller
- For scale bars alone, the export's cut-off advice reads "make the scale bar larger" first and is always singular. It should name moving it inside the page and making its box larger, in the singular or plural by count.
layout.import's capability check parses the imported layout once per key. One read is enough.
Proposed fix
null_resetscovers a scale bar'stextSize.layout.updatemeasures a scale bar givenxory.- Above the default size, an end label running into the first makes the box too small, which is said.
- A grid label reaching further in than the frame is across is left out, as a label without room is. This applies at every size, so on a frame smaller across than a default label (about 5 mm) the label is left out instead of cut.
- The publication box basis records the frame's map, and a change of
centerormapre-measures it. The width before the change is measured on the old map and centre, the width after on the new ones. - The advice above, and
imported_layout_usestaking all of a capability's keys.
Each fix has a regression test that fails without it.
Metadata
Metadata
Assignees
Labels
No labels
Activity
Layout scale bars and grids: fixes after opengeos#2660 (opengeos#2698) (