diff --git a/crates/assistant/skills/print-layout/SKILL.md b/crates/assistant/skills/print-layout/SKILL.md index dc333973c8..3202009068 100644 --- a/crates/assistant/skills/print-layout/SKILL.md +++ b/crates/assistant/skills/print-layout/SKILL.md @@ -27,7 +27,7 @@ description: Make a printable page layout — map frame, title, legend, north ar labels' size) and `"fit"` (`"adjustDivisionValue"`, `"adjustDivision"`, `"adjustWidth"`). A `"legend"` can take `"columns"` (1–6), `"fit"` (`"manual"`, `"adjustSize"`, `"adjustColumns"`, `"adjustColumnsAndSize"`: shrink its text or add columns to fit its box), `"subtitle"` (one line under its title), `"sizes": "nested"` (a point layer's marker sizes one inside another on a common base), `"showCounts": true` (each class row ends in its number of features; none for a layer read from a database, over the web or a view at a time from other files), - `"showLayerNames": false`, `"layerOrder": [""]` (those layers first, the map unchanged), `"columnBreaks": [""]` (each starts a column; no `"columns"` above 1 beside them) and `"classLabels"` (`{"": {"": ""}}`: its own text for a + `"showLayerNames": false`, `"layerOrder": [""]` (those layers first, the map unchanged), `"columnBreaks": [""]` (each starts a column; no `"columns"` above 1 beside them), `"oneRow": true` (every entry side by side in one row, however many; no `"columns"` above 1 or `"columnBreaks"` beside it) and `"classLabels"` (`{"": {"": ""}}`: its own text for a class, the layer keeping its label). A `"picture"` takes a `"path"` (a PNG or JPEG file; it remembers the file) or an `"image"` (base64); `layout.update` with `"path"` reads it again. A `"text"` or `"dynamicText"` can take diff --git a/crates/engine/command-surface.txt b/crates/engine/command-surface.txt index 2b08e43ad5..0ee48dffeb 100644 --- a/crates/engine/command-surface.txt +++ b/crates/engine/command-surface.txt @@ -284,7 +284,7 @@ layer.transparency layer? value layer.visibility layer? visible? layer.zoomTo layer? layout.activate name layout -layout.addElement layout? kind frame? of? text? size? color? bold? italic? align? letterSpacing? rotation? wrap? valign? lineSpacing? case? font? fallback? title? subtitle? allClasses? hideOther? showNoData? exclude? layerOrder? columnBreaks? columns? textSize? classLabels? sizes? showCounts? showLayerNames? orientation? ticks? tickSide? reverse? fill? width? radius? dash? dir? head? angle? length? image? path? layer? field? label? group? statistic? order? bars? other? stack? values? decimals? barColor? classes? labelAlign? mirror? max? hideLabels? barOutline? rows? fields? header? sort? descending? selectedOnly? step? type? crs? short? mgrs? labels? style? tickLength? format? hemisphere? edges? labelOrientation? labelSize? off? name? direction? at? section? band? side? gap? thickness? unit? lineColor? lineWidth? min? guides? outline? units? divisions? subdivisions? divisionsBeforeZero? labelPosition? unitLabel? unitLabelPosition? fit? x? y? w? h? background? +layout.addElement layout? kind frame? of? text? size? color? bold? italic? align? letterSpacing? rotation? wrap? valign? lineSpacing? case? font? fallback? title? subtitle? allClasses? hideOther? showNoData? exclude? layerOrder? columnBreaks? oneRow? columns? textSize? classLabels? sizes? showCounts? showLayerNames? orientation? ticks? tickSide? reverse? fill? width? radius? dash? dir? head? angle? length? image? path? layer? field? label? group? statistic? order? bars? other? stack? values? decimals? barColor? classes? labelAlign? mirror? max? hideLabels? barOutline? rows? fields? header? sort? descending? selectedOnly? step? type? crs? short? mgrs? labels? style? tickLength? format? hemisphere? edges? labelOrientation? labelSize? off? name? direction? at? section? band? side? gap? thickness? unit? lineColor? lineWidth? min? guides? outline? units? divisions? subdivisions? divisionsBeforeZero? labelPosition? unitLabel? unitLabelPosition? fit? x? y? w? h? background? layout.addFrame layout? shape? points? map? x? y? w? h? layout.arrange layout? element to layout.arrangement favourite? save? arrangement? remove? @@ -306,7 +306,7 @@ layout.save layout? path layout.series layout? layer nameField? frame? margin? off? layout.seriesPage layout? page layout.seriesRefresh layout? -layout.update layout? element x? y? w? h? name? visible? locked? text? size? color? bold? italic? align? letterSpacing? rotation? wrap? valign? lineSpacing? case? font? fallback? title? subtitle? allClasses? hideOther? showNoData? exclude? layerOrder? columnBreaks? labels? classLabels? columns? textSize? showLayerNames? sizes? showCounts? orientation? ticks? tickSide? reverse? style? fill? outline? radius? width? dash? dir? head? angle? length? units? divisions? subdivisions? divisionsBeforeZero? labelPosition? unitLabel? unitLabelPosition? fit? map? scale? center? bearing? pitch? grid? extentIndicator? extentNumbers? border? section? layer? field? label? group? statistic? order? bars? other? stack? values? decimals? barColor? classes? labelAlign? mirror? max? band? side? gap? thickness? unit? lineColor? lineWidth? min? guides? barOutline? hideLabels? rows? fields? header? sort? descending? selectedOnly? image? path? background? +layout.update layout? element x? y? w? h? name? visible? locked? text? size? color? bold? italic? align? letterSpacing? rotation? wrap? valign? lineSpacing? case? font? fallback? title? subtitle? allClasses? hideOther? showNoData? exclude? layerOrder? columnBreaks? labels? classLabels? oneRow? columns? textSize? showLayerNames? sizes? showCounts? orientation? ticks? tickSide? reverse? style? fill? outline? radius? width? dash? dir? head? angle? length? units? divisions? subdivisions? divisionsBeforeZero? labelPosition? unitLabel? unitLabelPosition? fit? map? scale? center? bearing? pitch? grid? extentIndicator? extentNumbers? border? section? layer? field? label? group? statistic? order? bars? other? stack? values? decimals? barColor? classes? labelAlign? mirror? max? band? side? gap? thickness? unit? lineColor? lineWidth? min? guides? barOutline? hideLabels? rows? fields? header? sort? descending? selectedOnly? image? path? background? locator.find locator? text limit? zoom? map.activate name map.addTiles url kind? name? bounds? attribution? minZoom? maxZoom? tileSize? singleImage? tms? subdomains? layers? styleLayers? opacity? blend? resampling? overlay? top? replace? id? view? start? end? unit? interval? dates? legend? connection? anonymous? diff --git a/crates/engine/src/cmd/diagram.rs b/crates/engine/src/cmd/diagram.rs index 11da886cfa..c79b447fc1 100644 --- a/crates/engine/src/cmd/diagram.rs +++ b/crates/engine/src/cmd/diagram.rs @@ -547,7 +547,7 @@ mod tests { "1 diagram(s) that could not be read or named no field removed", "1 diagram category(ies) with a blank field name", "1 diagram category(ies) repeating an earlier field kept", - "1 layout element(s) with a value out of range, a repeated id, an over-long name, a missing map frame reference, a repeated extent indicator or a background on a map frame repaired while opening the project (in \"Poster\")", + "1 layout element(s) with a value out of range, a repeated id, an over-long name, a missing map frame reference, a repeated extent indicator, a background on a map frame or columns beside a legend's one row repaired while opening the project (in \"Poster\")", ] { assert!(said.iter().any(|t| t.contains(text)), "{text}: {said:?}"); } diff --git a/crates/engine/src/cmd/layout.rs b/crates/engine/src/cmd/layout.rs index 2887567db3..8e01963a02 100644 --- a/crates/engine/src/cmd/layout.rs +++ b/crates/engine/src/cmd/layout.rs @@ -44,7 +44,8 @@ mod legend; pub(in crate::cmd) use legend::say_unfitted_legends_in; use legend::*; pub(crate) use legend::{ - legend_columns_param, legend_counts_param, legend_fit_param, legend_names_param, legend_sizes_param, legend_subtitle_param, + legend_columns_param, legend_counts_param, legend_fit_param, legend_names_param, legend_one_row_param, legend_sizes_param, + legend_subtitle_param, }; mod picture; pub(crate) use picture::gives_picture; @@ -220,6 +221,7 @@ pub fn commands() -> Vec { r##""exclude"?: [layer names] (legend: layers it leaves out though the map draws them), "##, r##""layerOrder"?: [layer names] (legend: these layers first, in this order, the others after them as the map draws them; the map is not changed), "##, r##""columnBreaks"?: [layer names] (legend: each of these layers starts a column, 5 at most, so "columns" above 1 and the fits that add columns are refused beside them), "##, + r##""oneRow"?: bool (legend: every entry side by side in one row, however many, the layers' names on a line over their classes; "columns" above 1, "columnBreaks" and the fits that add columns are refused beside it; default false), "##, r##""columns"?: 1..6 (legend: the columns its rows are laid in; default 1; with a fit that adds columns, the fewest it starts from), "##, r##""textSize"?: points, 4 to 100 (legend: its layers' names and classes' labels, its title, rows, swatches and gaps following in proportion and a point symbol keeping the size the map draws it at; default 9; scaleBar: its labels, the room over the bar and between them following, the bar keeping its size; default 8; table: its text, its rows and columns following; default 8; colorbar: its labels, the bar making room for them; default 8; refused outside that range, and for other kinds unless null, as showNoData is), "##, r##""classLabels"?: {"": {"": ""}} (legend: its own text for a class, by the label the layer shows for it, up to 200 characters; the layer keeps its label; a layer or class it can't find is refused), "##, @@ -342,6 +344,7 @@ pub fn commands() -> Vec { r##""columnBreaks"?: [layer names] (legend, as in layout.addElement; [] takes them off), "##, r##""labels"?: {"": "