app.executeMenuCommand('Fit Artboard to artwork bounds') threw the
command's error when the active artboard was locked or had no art on
it. The canvas's right-click menu dims Fit to Artwork Bounds then
(DocState::any_art_to_fit), so the script now does nothing and adds
no undo step, as for the other menu items that are not available. The docs state
that an available menu item runs its command and that an error that
command returns throws.
The host-versus-checker name table lists
Application.prototype.executeMenuCommand.
app.executeMenuCommand(name) runs the command of a menu item on the
active document. It takes the names selectall, deselectall, group,
ungroup, makeMask, releaseMask, compoundPath, noCompoundPath and
"Fit Artboard to artwork bounds", which fits the active artboard.
Names are matched exactly. Any other name throws an error that names
it, and a name that is not a string throws a TypeError. A menu item
that is not available, with no document open or nothing selected,
does nothing and adds no undo step.
Docs: docs/mcp.md, docs/target-app-parity.md.
The two Direct Selection preference tests in
crates/ui-egui/src/tests/removeanchors.rs now use
crate::testing::ui_context() and app.canvas_view() to place the click,
as the other canvas tests on main do.
A link in the grants file's place whose target is missing is there but
cannot be read, so script.grants fails on it and script.grants.revoke
leaves it as it is, instead of treating it as a missing grants file.
- remove() on the last path of a compound path keeps the compound path,
empty, as move() does, so a script that holds it can still read it.
edit.clear takes keepEmpty: true for this, and passes it on to
path.deleteAnchors when it deletes direct-selected anchors; without
it, Clear still deletes a compound path it empties.
- note, like name, takes a number or a Boolean as the text String()
gives it.
- Assigning a graph mark or label the opacity it already has throws
Cannot edit in a hidden or locked layer when the graph keeps another
opacity for its series or kind, since the assignment would still
change the graph.
- Only the exact opacity the getter reports counts as the opacity an
object already has; a value that differs from it by less than 0.0001
is now applied instead of being dropped.
- Reading a document's selection orders only the selected objects, by
their place in the tree, so its cost no longer grows with the size of
the document.
- docs/mcp.md: the opacity exception, note, keepEmpty, and that
strict-mode code throws a TypeError when it assigns a member an object
lacks.
Docs: docs/mcp.md.
- zOrder() on an object in a hidden or locked layer throws Cannot edit
and changes nothing, as the other setters do.
- Assigning an object the opacity it already has no longer throws when
its layer is hidden or locked. hidden and locked are still refused
there, whatever the value.
- The docs say that a top-level var selection = ... assigns the
selection, that the selection order and the tab order of documents
differ from the objectReferences page, and that assigning a member a
collection lacks throws Not found.
Docs: docs/mcp.md.
The white checks for colorized images in PDF export, EPS export and Print
Ink Fixes now go through DiscardWhite, which replaces
Document::spot_ink and Document::discards_white_overprint. Printed
separations read DiscardWhite with the spot inks they print, so a white
spot ink converted to process inks knocks out there.