Ensured zoom control invalidates adorner layer - #34
Merged
carl-andersson-at-westermo merged 1 commit intoSep 22, 2026
Merged
carl-andersson-at-westermo merged 1 commit into
carl-andersson-at-westermo merged 1 commit into
Conversation
carl-andersson-at-westermo
requested review from
kngrektor
and
a lite review from Copilot
September 22, 2026 13:59
Copilot started reviewing on behalf of
carl-andersson-at-westermo
September 22, 2026 13:59
View session
kngrektor
approved these changes
Sep 22, 2026
carl-andersson-at-westermo
deleted the
fix/zoom-layer-does-not-invalidate-adorner-layer
branch
September 22, 2026 14:03
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved moderate issues affect test isolation, assertion reliability, template setup, and layout performance.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Updates Avalonia zoom/pan handling so adorner layers track transformed graph content.
Changes:
- Adds presenter and adorner-layer invalidation.
- Adds regression tests for pan, zoom, and zoom-to-fill alignment.
| File | Summary | Review findings |
|---|---|---|
Westermo.GraphX.Controls.Avalonia/Controls/ZoomControl/ZoomControl.cs |
Invalidates visuals and adorners after transform changes. | Moderate: avoid measure invalidation when arrange invalidation is sufficient. |
Westermo.GraphX.Controls.Avalonia.Tests/ZoomControlAdornerLayerTests.cs |
Tests adorner alignment during viewport transformations. | Moderate: close created windows, assert non-null visual mappings, and always apply templates. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // matches a real themed application. | ||
| var layerManager = new VisualLayerManager { Child = zc }; | ||
| var window = new Window { Width = 800, Height = 600, Content = layerManager }; | ||
| window.Show(); |
Comment on lines
+97
to
+98
| adornerLayer.InvalidateMeasure(); | ||
| adornerLayer.InvalidateArrange(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.