Skip to content

fix: prevent sub-pixel values for Arena padding - #13

Open
larrifax wants to merge 1 commit into
wevm:mainfrom
larrifax:patch-1
Open

fix: prevent sub-pixel values for Arena padding#13
larrifax wants to merge 1 commit into
wevm:mainfrom
larrifax:patch-1

Conversation

@larrifax

@larrifax larrifax commented May 29, 2026

Copy link
Copy Markdown

I'm experiencing Arena padding values of e.g. 0.5px, which causes rendering bugs ultimately causing the arena image to be rendered "off-center".

This PR does the following:

  1. Ensures that the Arena padding is at least 1px
  2. Rounds padding values up to the nearest integer (could've rounded down, but noticed you used Math.ceil elsewhere)

Copilot AI review requested due to automatic review settings May 29, 2026 08:36
@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown

@larrifax is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adjusts SVG/foreignObject padding calculation to avoid fractional/zero padding values.

Changes:

  • Updates padding to be at least 1 and rounds half-cell padding up to the next integer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Cuer.tsx
const start = Math.ceil(edgeSize / 2 - arenaSize / 2)
const size = arenaSize + (arenaSize % 2)
const padding = cellSize / 2
const padding = Math.max(Math.ceil(cellSize / 2), 1)
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.

2 participants