mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-02 22:19:00 +00:00
Move whole-selection anchors with cached marks
This commit is contained in:
@@ -770,7 +770,7 @@ impl SelectionMarks {
|
||||
o.paths.iter_mut().chain(o.key.as_mut()).for_each(|path| path.apply_affine(shift));
|
||||
o.revision = outline_revision(&o.paths, o.key.as_ref(), o.color.to_array());
|
||||
}
|
||||
for knot in self.anchors.paths.iter_mut().flat_map(|p| &mut p.subpaths).flat_map(|sp| &mut sp.knots) {
|
||||
for knot in self.anchors.paths.iter_mut().chain(&mut self.anchors.plain).flat_map(|p| &mut p.subpaths).flat_map(|sp| &mut sp.knots) {
|
||||
knot.anchor += by;
|
||||
knot.in_ctrl += by;
|
||||
knot.out_ctrl += by;
|
||||
|
||||
@@ -993,7 +993,7 @@ fn points_of(outlines: &[Outlined], anchors: &Anchors, dots: &Dots) -> Vec<Point
|
||||
}
|
||||
}
|
||||
}
|
||||
for knot in anchors.paths.iter().flat_map(|p| &p.subpaths).flat_map(|sp| &sp.knots) {
|
||||
for knot in anchors.paths.iter().chain(&anchors.plain).flat_map(|p| &p.subpaths).flat_map(|sp| &sp.knots) {
|
||||
out.extend([knot.anchor, knot.in_ctrl, knot.out_ctrl]);
|
||||
}
|
||||
out.extend(dots.origins.iter().chain(&dots.centers).chain(&dots.key_anchor).map(|(at, _)| *at));
|
||||
|
||||
Reference in New Issue
Block a user