mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-03 06:29:26 -05:00
View > Zoom To (Area, Fit, Plate, Selected), Zoom In (Ctrl+Plus) and Zoom Out (Ctrl+Minus), the nest header's zoom buttons, Nest > First/Last/Next (Ctrl+Right)/Previous (Ctrl+Left) Plate and Tools > Measure Area, as WinForms. The wheel zooms by the WinForms step, panning hides the hover highlight, and resting on a part shows its drawing name after a second. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
795 B
C#
24 lines
795 B
C#
using Avalonia.Interactivity;
|
|
|
|
namespace OpenNest.Avalonia
|
|
{
|
|
/// <summary>The nest header's zoom buttons, as the WinForms nest window's.</summary>
|
|
public partial class NestView
|
|
{
|
|
private void OnZoomOut(object sender, RoutedEventArgs e) => Canvas.ZoomOut();
|
|
|
|
private void OnZoomIn(object sender, RoutedEventArgs e) => Canvas.ZoomIn();
|
|
|
|
private void OnZoomToFit(object sender, RoutedEventArgs e) => Canvas.ZoomToFit();
|
|
|
|
// The view takes the keyboard so Escape reaches the tool; a drawing picked up in the
|
|
// list would otherwise be placed by that focus.
|
|
private void OnZoomToArea(object sender, RoutedEventArgs e)
|
|
{
|
|
Canvas.StartZoomWindow();
|
|
CancelPickup();
|
|
Canvas.Focus();
|
|
}
|
|
}
|
|
}
|