mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 14:06:09 +00:00
Layers: layer.locate's reference names when the panel does not scroll
The Layers panel scrolls to the located row only when that row is in its list (crates/ui-egui/src/panels/layers.rs, where `revealed` is the row's position in the listed rows). With Show Layers Only, a search or the filter leaving the row out, a Locate does not scroll. The command's params text and docs/mcp.md said it scrolls on every call.
This commit is contained in:
@@ -132,7 +132,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Locate Object",
|
||||
["Window", "Layers"],
|
||||
None,
|
||||
"{id?, layersOnly?} (default: the frontmost selected object in the stacking order) highlight the object's row; the Layers panel opens the layers around it and scrolls to it, also when the row was already highlighted → {id, ancestry: [layer…, id]}. layersOnly (default false; the panel sends true while Show Layers Only is on, as Locate Layer) highlights the innermost layer or sublayer holding the object instead, or a layer id itself → {id: layer, objectId, ancestry: [layer…]}",
|
||||
"{id?, layersOnly?} (default: the frontmost selected object in the stacking order) highlight the object's row; the Layers panel opens the layers around it and scrolls to it, also when the row was already highlighted, unless Show Layers Only, a search or the filter leaves the row out of the list → {id, ancestry: [layer…, id]}. layersOnly (default false; the panel sends true while Show Layers Only is on, as Locate Layer) highlights the innermost layer or sublayer holding the object instead, or a layer id itself → {id: layer, objectId, ancestry: [layer…]}",
|
||||
has_doc,
|
||||
locate
|
||||
),
|
||||
|
||||
+2
-1
@@ -5877,7 +5877,8 @@ and `layerRows`, the rows highlighted in the panel.
|
||||
`layer.locate {id?, layersOnly?}` (highlights the selected object's row, or with several selected the row of the
|
||||
one frontmost in the stacking order, whatever order they were selected in; an `id` locates that object instead;
|
||||
the panel opens the rows around it;
|
||||
it scrolls to it on every call, also when the row was already highlighted;
|
||||
it scrolls to it on every call, also when the row was already highlighted, unless Show Layers Only, a search or the
|
||||
filter leaves the row out of the list, in which case it does not scroll;
|
||||
`layersOnly: true`, which the panel sends while Show Layers Only is on, as Locate Layer, highlights the innermost
|
||||
layer or sublayer holding the object instead, or a layer `id` itself, and returns `{id, objectId, ancestry}`)
|
||||
and `layer.clippingMask.toggle`.
|
||||
|
||||
Reference in New Issue
Block a user