Skip to content

Fixes for WayFinder and ZoomControl mouse interactions#28

Merged
carl-andersson-at-westermo merged 1 commit into
mainfrom
fix/mouse/shortcuts
Jun 16, 2026
Merged

Fixes for WayFinder and ZoomControl mouse interactions#28
carl-andersson-at-westermo merged 1 commit into
mainfrom
fix/mouse/shortcuts

Conversation

@carl-andersson-at-westermo

Copy link
Copy Markdown
Collaborator

No description provided.

@carl-andersson-at-westermo carl-andersson-at-westermo merged commit 4ff3c1b into main Jun 16, 2026
5 checks passed
@carl-andersson-at-westermo carl-andersson-at-westermo deleted the fix/mouse/shortcuts branch June 16, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request improves mouse-driven interactions in the Avalonia ZoomControl and fixes minimap (Wayfinder) rendering when trackable content has a positive top-left offset, with new automated tests covering both behaviors.

Changes:

  • Refactors ZoomControl pointer-drag handling into begin/move/complete interaction helpers and adjusts modifier gesture behavior (Alt zoom-box vs Ctrl+Alt area selection).
  • Fixes Wayfinder VisualBrush sampling to avoid clipping when ITrackableContent.ContentSize has positive X/Y offsets.
  • Adds unit + render snapshot tests for the new interaction behavior and the Wayfinder offset rendering regression.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Westermo.GraphX.Controls.Avalonia/Controls/ZoomControl/ZoomControl.cs Refactors pointer interaction flow and updates modifier-gesture handling; adds internal test hooks.
Westermo.GraphX.Controls.Avalonia/Controls/ZoomControl/Wayfinder.cs Adjusts content-extent handling and VisualBrush source rect to prevent clipping for offset trackable content.
Westermo.GraphX.Controls.Avalonia.Tests/ZoomControlTests.cs Adds tests for Alt-drag zoom-box and Ctrl+Alt-drag area selection behaviors.
Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.cs Adds an end-to-end render test for offset ITrackableContent minimap rendering.
Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.Renders_OffsetTrackableContent_WithoutClippingLowerOrRightEdges.verified.txt New verified snapshot for the offset-content render test.

Comment on lines 729 to 732
case KeyModifiers.Alt | KeyModifiers.Control:
case KeyModifiers.Alt:
_startedAsAreaSelection = true;
ModifierMode = ZoomViewModifierMode.ZoomBox;
break;
Comment on lines +733 to +735
case KeyModifiers.Alt:
ModifierMode = ZoomViewModifierMode.ZoomBox;
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants