velxio/frontend/src
David Montero 2d23b878e7 fix(canvas): rotated-component pin positions in 3 paths (fixes #230, #231, #232)
All three bugs are rotated components whose pin geometry is computed in a
path that ignores the rotation, so pins/wire-starts land tens of pixels off
the visual pin tips. The live rotate action already recalculates correctly;
these are the paths that didn't.

#231 (context-menu 'Tap a pin to wire'): both onPinSelect handlers in
SimulatorCanvas computed the wire start as getBoundingClientRect().left +
pin.x — adding the UNROTATED pin offset to the ROTATED bounding-box corner.
On a 90-deg HC-SR04 that put the start ~70-100px off (measured). Replaced
with calculatePinPosition(id, x+6, y+6, rotation), the same rotation-aware
helper wires and the pin overlay use.

#232 (rotate -> delete -> undo): recordRemoveComponent's undo restored the
component + wires but never recalculated wire endpoints, so a rotated part's
wires kept the unrotated coords captured at delete time. Added a
requestAnimationFrame updateWirePositions(id) after restore.

#230 + #232 (pin boxes wrong after import / undo / load, 'fixes if rotated
again'): PinOverlay captured the wrapper's layout box (the rotation pivot)
once at mount. On import/undo/load the component mounts already-rotated and
its wokwi-element may not be sized on the mount tick, baking a wrong pivot
that only refreshed when rotation changed. PinOverlay now re-measures after
layout (rAF) and whenever it is about to become visible (showPins dep).
2026-06-16 05:25:31 +02:00
..
__pro_stub__ refactor(examples): move Pico W WiFi examples to the pro overlay seam 2026-06-15 15:54:44 +02:00
__tests__ fix(sim): emulate AVR EEPROM (fixes #203) 2026-06-16 04:18:51 +02:00
assets
components fix(canvas): rotated-component pin positions in 3 paths (fixes #230, #231, #232) 2026-06-16 05:25:31 +02:00
data refactor(examples): move Pico W WiFi examples to the pro overlay seam 2026-06-15 15:54:44 +02:00
desktop
hooks
i18n feat(editor): follow-up GitHub star prompt for past dismissers 2026-06-15 22:15:14 +02:00
lib revert(sim): drop the WiFi run-gate seam (WiFi becomes freemium) 2026-06-15 20:04:42 +02:00
pages feat(editor): follow-up GitHub star prompt for past dismissers 2026-06-15 22:15:14 +02:00
services feat(P2.2c): show per-user custom libs in the Library Manager + autocomplete 2026-06-07 19:58:13 +02:00
simulation fix(sim): emulate AVR EEPROM (fixes #203) 2026-06-16 04:18:51 +02:00
store fix(canvas): rotated-component pin positions in 3 paths (fixes #230, #231, #232) 2026-06-16 05:25:31 +02:00
tokens
types feat(library-manifest): per-board manifests + autocomplete 2026-06-07 06:07:48 +02:00
utils seo: emit trailing-slash canonical + sitemap URLs 2026-06-15 06:10:32 +02:00
velxio-elements
App.css
App.tsx feat(seo): add /v3 release landing page + refresh About for 3.0 2026-06-15 08:52:09 +02:00
entry-server.tsx feat(seo): add /v3 release landing page + refresh About for 3.0 2026-06-15 08:52:09 +02:00
index.css
main.tsx
seoRoutes.ts feat(seo): add /v3 release landing page + refresh About for 3.0 2026-06-15 08:52:09 +02:00
vite-env.d.ts