Skip to content

fix: Refuse a scale that needs more than ten pages across or down - #29

Merged
scooper4711 merged 1 commit into
mainfrom
fix/page-limit
Nov 13, 2026
Merged

scooper4711 merged 1 commit into
mainfrom
fix/page-limit

Conversation

@scooper4711

Copy link
Copy Markdown
Owner

A mistyped or misdetected scale (for example 1 pixel per square, or a hex map) produced a plan of hundreds of thousands of pages, and SwiftUI aborted drawing the page labels.

TilePlanner.plan now returns nil above maximumPagesPerSide (10) in both orientations, checked before any page is laid out. The preview says "Too Many Pages" and the inspector shows a warning. This applies to typed and detected scales.

Four new planner tests. 107 tests pass; SwiftLint clean.

A mistyped or misdetected scale (for example 1 pixel per square, or a hex map) produced a plan of hundreds of thousands of pages, and SwiftUI aborted drawing the page labels. TilePlanner.plan now returns nil above maximumPagesPerSide (10) in both orientations, checked before any page is laid out. The preview says "Too Many Pages" and the inspector shows a warning. This applies to typed and detected scales.
@scooper4711
scooper4711 merged commit 7b2c1ee into main Nov 13, 2026
2 checks passed
@scooper4711
scooper4711 deleted the fix/page-limit branch November 13, 2026 13:16
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.

1 participant