80, 60 doesn't show on the center of the screen when using the slider
I'm not generally OCD, but this is bothersome. If it's not accurate, is it worth having?

Also bottom right corner seems to be 157x113
Recommendation for Triage
Issue Type: bug
Status: info-complete
Label(s): field editor, blocks
Duplicate Issue(s): No duplicate issue found
Likely Related: No related issue found
Suggested Priority: P3
Complexity: low
Copilot Agent Ready: β Yes
Recommendations for Assignee
Analysis
This is a UI/UX bug in the position field editor where the center position indicator displays "80, 60" instead of the mathematically correct center coordinates when using the slider. The Arcade screen is 160x120 pixels, so the center should be at (80, 60), but the issue reporter notes that the visual indicator doesn't align with the actual center point on the screen. A follow-up comment confirms the bottom-right corner shows as 157x113 instead of 159x119, suggesting a rounding or off-by-one calculation error in the position field editor's coordinate mapping between the visual display and actual pixel values.
Duplicate & Related Issues
Duplicates:
- No duplicates found via semantic search
Related Issues:
- No closely related issues found
Location Hints
The position field editor is implemented in pxt-core (microsoft/pxt repository), not in pxt-arcade:
-
../pxt/pxtblocks/fields/field_position.ts- Core implementation of the FieldPosition class that renders the visual position picker with slider and crosshairs. The bug is likely in thesetPos()function (lines ~103-143) orgetXY()function where coordinates are mapped between display pixels and actual screen coordinates. The scaling calculation usesx / width * this.params.screenWidthwhich may need rounding adjustments.
Note: The default screen dimensions are set to 160x120 (lines 26-27), matching Arcade's screen size.
Next Steps
Can assign to Copilot Coding Agent: β Yes, ready as-is
Reasoning: The issue has clear reproduction steps (use the position slider to select center), expected behavior (should show 80, 60 at center and 159, 119 at bottom-right), and specific file location. The fix likely involves adjusting the rounding logic in the coordinate mapping calculations to ensure proper centering and boundary values. This is a well-scoped, low-complexity bug fix suitable for automated resolution.
π΄ββ οΈ Ahoy! This treasure was crafted by pxt-arcade Issue Triage Assistant fer issue #5387 πΊοΈ