You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Z fits a turned part with width and height swapped #142
zoomToFootprint (web/render.js, used by Z, a click on a part row, and a link focused on a part) sizes the view from bbox.size as it is. It ignores two turns:
The part's angle. The drawing turns the box by bbox.angle (render-worker.js:887). A part at ±90° gets width and height swapped. Half the parts in netdaq-small and three quarters in ciaa-acc have a nonzero angle.
The board rotation. At 90° or 270°, the board's width runs up the screen, but the fit still compares size[0] to the canvas width.
It also repeats the fit math in zoomFitPoints, with a different zoom limit (50 against 200).
Fix: call zoomFitPoints with footprintCorners(fp) (added in #141). That handles both turns. One choice is left: which zoom limit to keep for a single part.
Related: #141 (E fits a turned pinned part). Not yet seen in the browser: pin a long part at 90° and press Z.
Activity
Z fits a part as it is drawn, turned by its angle and the board (#142)
Z fits a part as it is drawn, turned by its angle and the board (#142) (