mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 21:29:35 +00:00
Graphs: outlined labels and opened .ai graphs keep the plot in place at the next redraw
- A graph opened from a .ai file now saves `placedArt` too. Moving or restyling one of its labels before the first redraw no longer moves or stretches the plot. - Type > Create Outlines on a graph's labels now adjusts the saved bounds, so the outlines do not read as a move at the next redraw. A move of the graph made before the outlining is still followed. - A `placedArt` with no width or height falls back to the bounds of all of the art, as a graph saved without it does. - `art_bounds` moves to the doc crate so the .ai reader can use it. - docs/mcp.md describes `placedArt`, `placed` and when a redraw follows a move. - Tests: a legend across the top, a legend after a right value axis and legend labels of several lines keep the plot in place through label size changes; moving a category label on its own; outlining labels before and after a move; a flat `placedArt`; a label moved in an opened .ai graph.
This commit is contained in:
@@ -850,6 +850,13 @@ kind takes them when the graph is drawn again. The graph saves the paragraph att
|
||||
`categoriesPara` and `legendPara` in its label styles, and still sets each label's alignment for its place. The legend
|
||||
leaves room for a legend label's stored indents, spacing and leading.
|
||||
|
||||
When a graph is drawn again, its plot moves and scales with any move or scale of the graph made since it was last
|
||||
drawn. The graph saves the bounds of its art other than type as `placedArt` (and the bounds of all of its art as
|
||||
`placed`), and measures the move or scale on those. Changing the size, indents or spacing of the labels, moving a label
|
||||
on its own and `type.createOutlines` on labels do not move or scale the plot. A graph opened from a `.ai` file saves
|
||||
`placedArt` too. A graph saved without `placedArt`, or with a `placedArt` that has no width or height, is measured on
|
||||
`placed`.
|
||||
|
||||
The `appearance.*` commands, `graphicStyle.apply` and `graphicStyle.redefine`, and the paint, stroke, gradient and
|
||||
transparency commands given an `item` (or the Appearance panel's active row) store a graph label's object rows for its
|
||||
kind of label: the paint, weight, opacity and blend mode of its topmost visible fill and stroke row, their order and
|
||||
|
||||
Reference in New Issue
Block a user