Skip to content

Commit

Permalink
Remove corner radius effect on frame size for axis-aligned wires
Browse files Browse the repository at this point in the history
  • Loading branch information
zakarumych committed Apr 11, 2024
1 parent 02f0247 commit 2e2e225
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions src/ui/wire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,7 @@ pub fn draw_wire(
}

WireStyle::AxisAligned { corner_radius } => {
draw_axis_aligned(
ui,
shapes,
corner_radius,
frame_size.max(corner_radius),
from,
to,
stroke,
);
draw_axis_aligned(ui, shapes, corner_radius, frame_size, from, to, stroke);
}
}
}
Expand All @@ -250,14 +242,9 @@ pub fn hit_wire(
let points = wire_bezier_5(frame_size, from, to);
hit_bezier_5(pos, &points, threshold)
}
WireStyle::AxisAligned { corner_radius } => hit_axis_aligned(
pos,
corner_radius,
frame_size.max(corner_radius),
from,
to,
threshold,
),
WireStyle::AxisAligned { corner_radius } => {
hit_axis_aligned(pos, corner_radius, frame_size, from, to, threshold)
}
}
}

Expand Down

0 comments on commit 2e2e225

Please sign in to comment.