Review: Shaper reads its explicit ids in one line; ROADMAP (#1078)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0d748500d6
commit
eaf96c60ae
File diff suppressed because one or more lines are too long
|
|
@ -500,10 +500,7 @@ pub(crate) fn refresh(before: &Document, d: &mut Document) -> Result<()> {
|
|||
fn candidates(s: &Session, p: &Value, points: &[Point], tolerance: f64) -> Result<Vec<NodeId>> {
|
||||
let st = s.doc()?;
|
||||
let area = points.iter().fold(Rect::new(f64::MAX, f64::MAX, f64::MIN, f64::MIN), |b, p| b.union_pt(*p)).inflate(tolerance, tolerance);
|
||||
let supplied = match p.get("ids") {
|
||||
Some(_) => Some(checked_ids_param(s, p, "ids", "shaper.scribble")?),
|
||||
None => None,
|
||||
};
|
||||
let supplied = p.get("ids").map(|_| checked_ids_param(s, p, "ids", "shaper.scribble")).transpose()?;
|
||||
let expand = supplied.is_none() && st.selection.objects.len() < 2;
|
||||
let ids = supplied.unwrap_or_else(|| if st.selection.objects.len() > 1 { st.selection.objects.clone() } else { st.doc.selectable_art() });
|
||||
let eligible: Vec<NodeId> = ids
|
||||
|
|
|
|||
Loading…
Reference in New Issue