Add custom click targets to make Text node output easier to select (#4095)

* Stop pushing duplicate layer entries when re-clicking an already-selected layer

* Make Text node generate per-glyph bounding box click targets

* Show source-geometry outlines and aggregate all rows for layer click targets

* Strip 'editor:click_target' override on Path node so direct edits restore precise hit testing

* Fix inverting a zero-determinate transform
This commit is contained in:
Keavon Chambers
2026-05-02 18:12:42 -07:00
committed by GitHub
parent ab7f59ca61
commit 325e9aff06
11 changed files with 245 additions and 89 deletions

View File

@@ -309,6 +309,7 @@ impl NodeGraphExecutor {
Err(e) => {
// Clear the click targets while the graph is in an un-renderable state
document.network_interface.update_click_targets(HashMap::new());
document.network_interface.update_outlines(HashMap::new());
document.network_interface.update_vector_modify(HashMap::new());
return Err(format!("Node graph evaluation failed:\n{e}"));
}
@@ -355,6 +356,7 @@ impl NodeGraphExecutor {
// Clear the click targets while the graph is in an un-renderable state
document.network_interface.update_click_targets(HashMap::new());
document.network_interface.update_outlines(HashMap::new());
document.network_interface.update_vector_modify(HashMap::new());
log::trace!("{e}");
@@ -415,6 +417,7 @@ impl NodeGraphExecutor {
local_transforms,
first_element_source_id,
click_targets,
outlines,
clip_targets,
vector_data,
backgrounds: _,
@@ -427,6 +430,7 @@ impl NodeGraphExecutor {
first_element_source_id,
});
responses.add(DocumentMessage::UpdateClickTargets { click_targets });
responses.add(DocumentMessage::UpdateOutlines { outlines });
responses.add(DocumentMessage::UpdateClipTargets { clip_targets });
responses.add(DocumentMessage::UpdateVectorData { vector_data });
responses.add(DocumentMessage::RenderScrollbars);