mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 15:31:54 +00:00
Path Precision Tools: Trim at Crossings shows the stretch a click would remove
Hovering with the Trim at Crossings Tool draws in red the stretch a click there would remove, on the same paths and by the same rules as the click, and nothing over empty canvas or hidden and locked paths. A drag draws every stretch its rectangle or freehand line would remove while it reaches at most 32 paths. In isolation mode only paths inside the isolated object are highlighted. What a pick removes moves from the command into vectorcraft_tools::addons::trim::plan, which the command and the tool both use. A preview spends at most a twentieth of the crossing work a click may (Work::share); past that it shows nothing, and the click or release still removes what it reaches. The tool keeps the crossings it found for the document as it is, so moving along one path does not search again, and kept crossings still count against a pick's work budget. Work::spent_since and Work::draw in vectorcraft-pathops measure and charge that work. Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md.
This commit is contained in:
@@ -233,11 +233,7 @@ pub fn has_multi(s: &Session) -> std::result::Result<(), String> {
|
||||
/// editing and symbol editing mode isolate their own layer, which does not count here; an object
|
||||
/// isolated inside them counts.
|
||||
pub(crate) fn ordinary_isolation(st: &crate::DocState) -> Option<vectorcraft_doc::NodeId> {
|
||||
st.isolation.filter(|l| {
|
||||
!st.doc.pattern_edit.as_ref().is_some_and(|e| e.layer == *l)
|
||||
&& !st.doc.mask_edit.as_ref().is_some_and(|e| e.layer == *l)
|
||||
&& !st.doc.symbol_edit.as_ref().is_some_and(|e| e.layer == *l)
|
||||
})
|
||||
vectorcraft_tools::ordinary_isolation(&st.doc, st.isolation)
|
||||
}
|
||||
/// Objects are selected ([`has_selection`]), and in isolation mode ([`ordinary_isolation`]) at
|
||||
/// least one of them is inside the isolated object: Object › Lock's and Object › Hide's items.
|
||||
|
||||
Reference in New Issue
Block a user