mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 05:22:58 -05:00
Scripts: deleting a clipping path cannot make a tracing
remove(), the document's pageItems.removeAll() and textFrames.removeAll() release the mask of a clip group whose clipping path they delete. A clip group named Image Trace with an image next above its clipping path then became an ordinary group named as a tracing with an image first, which reads as a tracing. They now throw "Only Image Trace can make a tracing" and delete nothing in that case. docs/mcp.md names the removeAll() collections that release a mask and the ones that refuse to delete a clipping path instead.
This commit is contained in:
1 parent
0d8a56cfde
commit
80569dc577
4 files changed
+83
-7
No files matched your search
+7
-3
@@ -3242,9 +3242,13 @@ through `$`:
|
||||
is hidden or locked, is inside a hidden or locked layer or group, or is a group that holds one, and `removeAll()`
|
||||
when any object is, throw `cannot delete hidden or locked objects` and delete nothing. `remove()` on an object on
|
||||
a locked artboard, and `removeAll()` when any object is on one, throw `cannot delete objects on a locked artboard`
|
||||
and delete nothing. `remove()`, and any collection's `removeAll()`, that deletes the clipping path of a clip group
|
||||
or clipping layer also releases that clipping mask in the same undo step, so the object above the clipping path
|
||||
does not become the new clipping path; a deletion that leaves the clipping path keeps the mask. Setting `width` or `height` scales the object along
|
||||
and delete nothing. `remove()`, the document's `pageItems.removeAll()` and any `textFrames.removeAll()` that
|
||||
delete the clipping path of a clip group or clipping layer also release that clipping mask in the same undo step,
|
||||
so the object above the clipping path does not become the new clipping path; a deletion that leaves the clipping
|
||||
path keeps the mask. When the released group is named `Image Trace` and an image would be left at its bottom, they
|
||||
throw `Only Image Trace can make a tracing` and delete nothing. The `removeAll()` of a layer's or group's
|
||||
`pageItems`, and of any `groupItems` or `compoundPathItems`, does not release a mask: it throws as described
|
||||
above. Setting `width` or `height` scales the object along
|
||||
the page's axes, so a rotated object then reads back the size that was set. `index` and `getByName` throw
|
||||
`Not found`; and
|
||||
`app.activeDocument` with no document open throws `No active document`. `Document.selection` takes one page item,
|
||||
|
||||
Reference in new issue
Block a user