mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 20:36:02 +00:00
Merge pull request #7505 from dotCooCoo/fix/no-op-undo-steps
Undo: no step when Randomize Opacity or a type setting changes nothing
This commit is contained in:
+4
-2
@@ -684,7 +684,8 @@ CJK composition.
|
||||
(the selection, or `ids`) and reply `{vertical, ids}`. The writing direction is a setting of the whole thread: the
|
||||
commands set every frame of a selected frame's thread, and `ids` lists them all. Threading frames gives the thread its
|
||||
first frame's direction, frames taken out of a thread keep theirs, and a file whose frames of one thread differ opens
|
||||
with the first frame's direction in all of them.
|
||||
with the first frame's direction in all of them. When every frame already has the direction, the command records no
|
||||
undo step.
|
||||
|
||||
For SVG/SVGZ, `export`'s top-level `outlineText: true` writes text as paths; DXF takes it too (its type is outlined anyway unless `preserve: editability`).
|
||||
PDF instead uses `options: {"advanced": {"outlineText": true}}`; its default is false (live text).
|
||||
@@ -8969,6 +8970,7 @@ for the selected type objects (or `ids`); without `on` it sets the opposite of t
|
||||
on. Optical Margin Alignment is a setting of the whole thread: the command sets every frame of a selected frame's
|
||||
thread, and `ids` lists them all. Threading frames gives the thread its first frame's setting, frames taken out of
|
||||
a thread keep it, and a file whose frames of one thread differ opens with the first frame's setting in all of them.
|
||||
When every frame already has the setting, the command records no undo step.
|
||||
In every paragraph of point and area type, these characters hang outside the margin when they
|
||||
start or end a line: quotation marks, hyphens (a hyphenated line's hyphen too), full stops and commas hang wholly;
|
||||
asterisks, tildes, ellipses, en and em dashes, colons and semicolons hang by half their width; and A, V, W, Y, v, w
|
||||
@@ -11550,7 +11552,7 @@ as `object.setBounds` measures them (Use Preview Bounds), except Arrange in Grid
|
||||
| `addon.arrange.replace` | `fit`: `keep`, `bounds` (the replaced object's width and height), `proportional` (fits inside them) (`keep`); `scaleStrokes`; `keep` (false) | Puts a copy of the topmost selected object centred on each of the other selected objects, in that object's place in the stacking order; the replaced objects are deleted unless `keep` (the copy then goes right above each). Needs two objects or more; the copies are selected. → `{ids}` |
|
||||
| `addon.arrange.size` | `width`, `height` pt, 0.001…1000000 (at least one); `proportional` (false: a side not given stays; true: it follows the given one in proportion); `reference` 0…8 (4, the centre); `scaleStrokes` | Gives every selected object that width and height, keeping its reference point in place (the 9-point grid row by row from the top-left). |
|
||||
| `addon.arrange.groupOverlapping` | none | Groups the selected objects (at most 20000) wherever their visual bounds overlap or touch, chains included: when A overlaps B and B overlaps C, all three go in one group. Only objects in the same layer or group are grouped together; objects that overlap nothing stay as they are. Each new group goes where its frontmost member was in the stacking order, and the groups and the objects left alone stay selected; with nothing overlapping it makes no step. Needs two objects or more. → `{groups: [id…], grouped}` (how many objects went into groups) |
|
||||
| `addon.arrange.randomizeOpacity` | `min`, `max` % 0…100 (30, 100; `min` not more than `max`); `seed` whole number (0); `ids` (the selection) | Gives each selected object its own opacity (the object opacity the Transparency panel sets), picked at random and evenly from `min` to `max`; the same seed, objects and range give the same opacities. Groups take one opacity of their own; the objects inside keep theirs. → `{count}` |
|
||||
| `addon.arrange.randomizeOpacity` | `min`, `max` % 0…100 (30, 100; `min` not more than `max`); `seed` whole number (0); `ids` (the selection) | Gives each selected object its own opacity (the object opacity the Transparency panel sets), picked at random and evenly from `min` to `max`; the same seed, objects and range give the same opacities. Groups take one opacity of their own; the objects inside keep theirs. A run that changes no opacity, such as `min` and `max` both at the opacity every object has, records no undo step. → `{count}` |
|
||||
| `addon.arrange.sort` | `by`, `apply`: `width`, `height`, `area` (width × height), `x` (left edge), `y` (top edge), `opacity` (%), `stacking` (stacking order from the back) (`area`, `stacking`); `order`: `ascending` (small to large), `descending` (large to small), `random` (`ascending`); `distribute` (false); `seed` whole number (0, for `random`); `scaleStrokes`; `ids` (the selection) | Sorts the selected objects (at most 20000) by `by` and gives them the values of `apply` in that order: the first gets the smallest value. Without `distribute` the objects trade the values they have; with it the values step evenly from the smallest to the largest. A width, height or area changes about each object's centre (an area in proportion), a place moves the top-left corner. Stacking order always trades places, and only among objects in the same layer or group. Needs two objects or more. → `{count}` |
|
||||
|
||||
Zoom to Selection is the UI command `addon.arrange.zoomSelection {}` (remote mode only): it zooms and centres the
|
||||
|
||||
Reference in New Issue
Block a user