velxio/frontend/src
David Montero 467ca4455f fix(canvas): wires off pins after rotation — wrapper offset was (4,6) instead of (6,6)
User report: "rotating components messes up their connections" — pressing R
on a placed component visibly slid every wire endpoint off its pin tip.

Root cause: the DynamicComponent wrapper has padding:4px + border:2px on
EVERY side, so the inner web-component element sits 6 px in from the
wrapper top-left on BOTH axes. The wire layer assumed an asymmetric
(4, 6) offset, baked into:

  * useSimulatorStore.updateWirePositions       — store.x + 4, store.y + 6
  * useSimulatorStore.recalculateAllWirePositions
      — start (startComp.x + 4, startComp.y + 6)
      — end   (endComp.x   + 4, endComp.y   + 6)
  * pinPositionCalculator.calculatePinPosition  — inverse: (componentX - 4, componentY - 6)

Unrotated the 2 px X bias was visible only as a very-slightly-off wire,
which nobody filed. When the user rotated the component, the bias
rotated WITH it — at 90° it became a 2 px Y offset (wires hanging below
the pin), at 180° a 2 px X offset on the other side, at 270° upward. UX
read as "wires disconnected".

Verified the real CSS box via chrome-devtools-mcp against several live
components on velxio.dev (RGB LED + 3 resistors + analog joystick): all
report padding-left/top = 4 px, border-left/top = 2 px, inner offset = 6
on both axes.

Fix: use (+6, +6) at every site, single source of truth in a comment
explaining padding+border arithmetic. Updated the rotation regression
test to match the corrected math (numbers shift by 2 px on every
expectation that referenced the old offset).

Pin position math, pivot derivation and the rotate-N×90° round trip
unchanged — only the offset constant moved.
2026-05-26 15:16:04 +02:00
..
__pro_stub__
__tests__ fix(canvas): wires off pins after rotation — wrapper offset was (4,6) instead of (6,6) 2026-05-26 15:16:04 +02:00
assets
components fix(editor): surface QEMU compile failure to the user instead of silent warning 2026-05-23 08:39:26 +02:00
data fix(examples): use hardware I2C (not SoftI2C) in smart-ui-eyes 2026-05-23 18:06:42 +02:00
desktop test(desktop): unit tests for bannerFor + suppress redundant banner in lockout 2026-05-25 12:05:39 -03:00
hooks
i18n feat(import): unify project import — accept .vlx and .zip in both entry points 2026-05-22 20:55:06 +02:00
lib feat(frontend): runtime API base + desktop overlay extension points 2026-05-21 04:50:19 +02:00
pages feat(landing): "Try Simulator Free Online" + download CTA slot below 2026-05-22 03:33:21 +02:00
services feat(boards): expose Raspberry Pi 4 and Pi 5 in the picker (UI + pin wiring) 2026-05-23 04:46:59 +02:00
simulation fix(avr/serial): queue RX bytes so Serial.readStringUntil sees the whole input 2026-05-23 17:50:19 +02:00
store fix(canvas): wires off pins after rotation — wrapper offset was (4,6) instead of (6,6) 2026-05-26 15:16:04 +02:00
tokens
types fix(spice+pipeline): LED visualization, INPUT_PULLUP, ESP32-C3, PWM fade, examples 2026-05-18 21:52:07 -03:00
utils fix(canvas): wires off pins after rotation — wrapper offset was (4,6) instead of (6,6) 2026-05-26 15:16:04 +02:00
velxio-elements
App.css
App.tsx feat(desktop): hide web nav + redirect / → /editor in Tauri builds 2026-05-22 18:08:33 -03:00
entry-server.tsx
index.css
main.tsx feat(desktop): hide header strip, splash screen, native locale switcher 2026-05-22 19:39:22 -03:00
seoRoutes.ts
vite-env.d.ts