Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@pauldendulk
Copy link
Member

@pauldendulk pauldendulk commented Sep 15, 2025

The Problem
If no PanBounds were set the Navigation methods were never executed.

The Solution
After this PR the postponed calls are executed as soon as the size is known.

If the PanBounds were set it will zoom to those at that point. If not then it will not change the Viewport, but HasExecutedPostponedCalls will be set to true so that subsequent calls will be executed right away.

Risks
This change opens up more scenarios and some may cause problems related to missing PanBounds or a resolution that is still zero.

@pauldendulk pauldendulk requested a review from Copilot September 15, 2025 09:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the Navigator class to remove the requirement for PanBounds when executing postponed calls during initialization. The key change is that postponed calls can now be executed as soon as the viewport has a size, rather than requiring both size and PanBounds to be set.

  • Renamed initialization-related members to better reflect their purpose as "postponed calls"
  • Modified the initialization logic to execute postponed calls when viewport has size, regardless of PanBounds
  • Updated test cases to reflect the new behavior where extent changes are allowed without PanBounds

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Navigator.cs Core refactoring to rename initialization concepts to postponed calls and remove PanBounds requirement
NavigatorTests.cs Updated test cases and parameters to reflect new behavior allowing extent changes without PanBounds
SelectionStyleSample.cs Fixed category classification from "White" to "Styles"

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pauldendulk pauldendulk added the PR type: πŸ› Fix A bug fix or patch for existing functionality. label Sep 15, 2025
@pauldendulk pauldendulk merged commit 1fa4b46 into main Sep 15, 2025
5 checks passed
@pauldendulk pauldendulk deleted the refactor/run-postponed-calls-before-pan-bounds branch September 15, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR type: πŸ› Fix A bug fix or patch for existing functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants