- Expanding a tracing removes only its source image; other images a script
moved or duplicated into the group stay.
- A TracingObject goes stale when its original source image is gone, even
when another image now sits first in the group.
- Tracing, retracing, expanding and releasing restore the whole selection,
anchors and segments included, with only the replaced object remapped.
- app.open writes the open's warnings to the script console, as saveAs does.
- embed() checks the image's link state after the command instead of a
returned id rounded to a JavaScript number.
- The placed-image tests pass ordinary drive paths to File on Windows.
- Document.saveAs writes each warning file.saveAs gives to the console as a
line that starts with "saveAs: ", and still returns undefined.
- A save, export or open of a File the script names no longer reads a file
an open document links to outside the script's grants.
- A save or export that writes several files checks that no folder is where
one of them goes before it writes the first, so none of them is written.
- Moving the source image of a tracing within its tracing, and zOrder on it,
leave it first; zOrder SENDTOBACK on another object in a tracing puts it
just above the source.
- The two new script file errors are English only; their catalog rows are
removed (translations go through storytold/craft-i18n).
The images, tracing and save/open members now carry the type and
argument descriptions that main's Described lists expect, and
PlacedItem.contentVariable comes from the variables members. A
placedItems.add() handle now records the document's revert count, so
reading or assigning its file after File > Revert throws Stale page
item and places nothing, as other page items do.
The doc comment on bottom_controls still said the tools scroll above the controls in a short rail. The Tools panel's rail now uses footer_scrolls, so the controls scroll with the tools and the rail draws the rule above them.
With one object selected and the Selection tool active, or while Global
Edit is on, every frame copied each highlighted outline out of the kept
list and made one overlay per object, which the canvas flattened and
stroked again. With 10,000 matching objects that was most of a 27 ms
frame.
highlights and similar now return the kept outlines as a shared
Highlights, grouped by layer color with a revision that changes only when
the outlines are found again. The session sends one Overlay::Outlines per
color, and the canvas shows it as a SelectionOutline keyed by that
revision, so the lines are stroked again only when the outlines or the
view change.
craft-libs 186a229c8d holds storytold/craft-libs#4261, so a properties
dialog keeps its bound tab when a measuring frame ends before its body
runs. The style_dialog! wrapper no longer saves and restores the tab
around that frame for Character Style Options, Paragraph Style Options
and New Character Style or New Paragraph Style.
New tests open Character Style Options on Advanced Character Formats,
New Character Style on Character Color, and Document Setup on
Transparency, Type and Color, and check that each tab is still shown
after the first frames. With craft-libs before that change they fail
with the dialog back on General.
The status bar's Zoom field, Zoom Presets menu, Rotation menu and artboard
navigator were one memoized view keyed on the whole canvas view, so every
frame of a wheel pan changed the key and ran all four again. The Zoom field
reads only the view's zoom, and the status bar reads only the zoom of the
view the field commits.
- The Zoom field and Zoom Presets menu are their own memoized view, keyed on
the zoom instead of the canvas view, so a pan replays them.
- The Rotation menu and the artboard navigator are a second memoized view, so
a zoom change runs only the zoom controls.
The new test counts the runs of each view over ten pan frames and four zoom
changes; before the change the pan ran the navigation controls ten times.
The craft-libs pin on main includes craft-libs#4231, which starts a
radio row's options past the form's label column. A new test checks
that in the EPS and .ai save options dialogs the All and Range radios
start where the artboard check box starts, and that Transparent and
Opaque start where the Preview menu starts. With the craft-libs rev
pinned before #4231 it fails: All starts at x 526 and the check box at
x 619.
The name, note, hidden, locked, opacity, blendingMode, position, left,
top, width and height setters checked the assigned value before the
item, so a bad value on a removed item reported the value error instead
of "Stale page item". Each setter now looks up its item first.
Follow-up to #9288.
- Removing the last anchor of a closed path with its closing segment
selected also deselects the first anchor, the segment's other end.
- Removing a point puts back new art's paint, so a default stroke width
a script set still applies to the next path it draws.
- A removal that leaves the direct selection as it was waits with the
other point changes, unless every remaining anchor is now selected,
the selection refers to points that are gone, or the path is in an
Objects on Path group.
- Reading the points of a path first writes the waiting point changes
of another path in the same Objects on Path group.
- Writing a path in an Objects on Path group checks the other tracked
paths in the outermost such group, so their PathPoint handles go stale
when the group moves them, even after an undo.
Docs: docs/mcp.md, docs/target-app-parity.md.
Hit walks measure every path's culling box with PathData::control_bounds,
which read every anchor of the path on every call. Since anchors are kept
in shared chunks, that read follows two more pointers per path and goes
through the chunked iterator, so each node of a hover or cursor walk cost
about twice what it did before the chunks.
Each subpath's anchor list now keeps the box round its points and handles
once it is measured (Anchors::control_bounds), and every change to the
list clears it. A copy of the list keeps the box too. control_bounds
unions the subpaths' boxes, with the same result as before.
- anchors.rs: control_bounds reads the anchors once until they change,
counted by measured_control_anchors; each change to the list clears it.
- Tests count the anchors read: a list reads them once across calls and
copies, again after each kind of change, and a hover past 100 squares
reads none after the first.
The Stroke panel showed the stroke editor's rows with a label column of
their own, so the Alignment, Caps and Corners buttons and the Miter
Limit and Dash offset fields started left of the Weight, Arrowheads and
Profile controls. The panel now turns on StrokeEditor::host_labels
(craft-libs#4227, in the pinned craft-libs), and the editor's rows read
the label column of the panel's Stroke Options group.
the_panel_rows_start_their_controls_at_one_x now also checks the
Alignment, Caps, Corners, Miter limit and Dash offset controls.
The Type tool's text part was shown in the canvas's flow, in a scope
sized to the caret. While the tool edited text, every other frame ran
its UI twice: the frame's layout check found the part changed and the
frame was run again.
The part is now shown at the caret's rect with no allocation, as the
canvas's other overlays are, and each idle and typing frame runs once.
The app's root look now sets PresetCardLook::PageTile in place of Page,
so each preset card in New Document draws on a light veil of the scrim
with its paper on it. A card that is not selected now stands apart from
the dialog's surface. The craft-libs pin at 186a229c8d already has the
look (storytold/craft-libs#4180).
The new test resting_preset_cards_stand_on_a_tile checks that a resting
card is covered by a veil of the scrim and holds its white paper; it
fails with the old Page look.
In a window too short for every tool, the Tools panel kept its paint
chips, drawing modes and the other controls under the tools pinned at
the bottom, so fewer tools were in view. The controls now scroll with
the tools
(ToolRail::footer_scrolls): in a window 560 points tall the rail shows
14 tools instead of 10, and scrolling to the end brings the controls
into view under the last tool. Toolbars made with New Toolbar and
torn-off strips keep their footer in view.
main reads a script's File for host class members through
file_classes::file_path and defines FILE_REF_KEY and file_ref_path in
host_classes. file_path now reads the path from the object's FsEntry slot,
so an object made with Object.create(File.prototype) still is not a File,
and the branch's own copies of FILE_REF_KEY, file_ref_path and file_ref_of
are removed. file_ref uses main's key. The host class tests set the new
HostClass::info field.
The craft-libs pin now includes storytold/craft-libs#4147 and #4195. A
wrapping SpaceBetween row keeps its children at both edges when they fit
on one line, and a check box in a row inside a field shows its own label.
- Document Info: a row wraps through the shared row layout instead of
measuring its label and value first. A row that fits keeps its value at
the end; otherwise the value moves under the label.
- Image Trace: the Fills and Strokes check boxes in the Create field show
their own labels, without a nested field for each.
A new test checks that a Document Info value that does not fit beside
its label moves under it.