Fix freehand tool showing all anchors in overlay (#3585)
Use anchor_endpoints() instead of anchor_points() in path_endpoint_overlays() to only show overlays at true path endpoints, not intermediate points
This commit is contained in:
parent
fcf32b3cff
commit
f808e6d37c
|
|
@ -210,7 +210,7 @@ pub fn path_endpoint_overlays(document: &DocumentMessageHandler, shape_editor: &
|
||||||
let selected = shape_editor.selected_shape_state.get(&layer);
|
let selected = shape_editor.selected_shape_state.get(&layer);
|
||||||
let is_selected = |selected: Option<&SelectedLayerState>, point: ManipulatorPointId| selected.is_some_and(|selected| selected.is_point_selected(point));
|
let is_selected = |selected: Option<&SelectedLayerState>, point: ManipulatorPointId| selected.is_some_and(|selected| selected.is_point_selected(point));
|
||||||
|
|
||||||
for point in vector.anchor_points() {
|
for point in vector.anchor_endpoints() {
|
||||||
let Some(position) = vector.point_domain.position_from_id(point) else { continue };
|
let Some(position) = vector.point_domain.position_from_id(point) else { continue };
|
||||||
let position = transform.transform_point2(position);
|
let position = transform.transform_point2(position);
|
||||||
overlay_context.manipulator_anchor(position, is_selected(selected, ManipulatorPointId::Anchor(point)), None);
|
overlay_context.manipulator_anchor(position, is_selected(selected, ManipulatorPointId::Anchor(point)), None);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue