velxio/frontend/src/components/simulator
David Montero 5f04b42bdd fix(canvas): while running, the canvas is interact-only (no wire/pin/edit)
Reported: on a running circuit, clicking a pushbutton SELECTED the wire under it
instead of pressing the button — and you could still move wires / pick pins to
make connections during a run.

Root cause: component dragging was already locked during a run, but the
canvas-level onClick (wire selection via findWireNearPoint) wasn't — so a click
on a button bubbled to the canvas and selected the wire. The button press itself
fired (shadow DOM), but the wire-select made it feel broken.

Gate every EDIT interaction on the existing interactionRunning predicate while
keeping part interaction (buttons/switches/pots) and pan/zoom:
- canvas onClick wire-selection + onDoubleClick waypoint-insert
- wire segment / waypoint drag handles (mouse + touch)
- pin-click wire creation
- touch tap wire-selection
- hide the PinOverlay (was gated on !running, so board-less runs still showed
  clickable pins) and skip wire-hover highlighting while running
- clear any wire/component selection when a run starts so leftover handles don't
  linger over the live circuit

Component drag + property dialog were already gated on interactionRunning; this
extends the same 'freeze to edit, run to interact' model to wires and pins.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 19:14:51 +02:00
..
BoardOnCanvas.tsx feat(boards): add 6 STM32 boards (F4 Discovery, Olimex H405, Netduino 2/+2, Pill variants) 2026-05-31 03:19:26 -03:00
BoardOptionsModal.css feat(board-options): per-board options modal + persistence 2026-05-18 21:50:45 -03:00
BoardOptionsModal.tsx feat(editor): rename boards & custom chips; show which target owns each file 2026-06-04 06:22:25 +02:00
BoardPickerModal.tsx feat: STM32 (Blue Pill / Black Pill) QEMU emulation + Pro board gating 2026-05-30 19:06:14 -03:00
CameraToggle.tsx
…
CanvasMinimap.css fix(minimap): hit-test against clamped rect + shrink to 100x75 2026-05-14 22:53:34 +02:00
CanvasMinimap.tsx fix(minimap): hit-test against clamped rect + shrink to 100x75 2026-05-14 22:53:34 +02:00
CircuitVerificationModal.tsx
…
ComponentPalette.css
…
ComponentPalette.tsx
…
ComponentPropertyDialog.css
…
ComponentPropertyDialog.tsx
…
FlashModal.tsx feat(flash): write compiled sketches to real USB boards (phases D1+D3) 2026-05-27 00:20:20 -03:00
InstallLibrariesModal.css
…
InstallLibrariesModal.tsx
…
LibraryManagerModal.css
…
LibraryManagerModal.tsx
…
Oscilloscope.css feat(scope/trigger): add Auto / Normal / Single-shot trigger modes 2026-05-22 21:11:03 +02:00
Oscilloscope.tsx feat(editor): rename boards & custom chips; show which target owns each file 2026-06-04 06:22:25 +02:00
PinOverlay.tsx fix(canvas): use wrapper top-left for rotation pivot (#205 follow-up) 2026-05-26 20:42:27 +02:00
PinPickerDialog.tsx
…
SelectionActionBar.tsx
…
SensorControlPanel.css
…
SensorControlPanel.tsx fix(sensor-panel): per-sensor state when switching between same-type sensors 2026-05-16 22:28:52 -03:00
SerialMonitor.tsx feat(editor): rename boards & custom chips; show which target owns each file 2026-06-04 06:22:25 +02:00
SimulatorCanvas.css
…
SimulatorCanvas.tsx fix(canvas): while running, the canvas is interact-only (no wire/pin/edit) 2026-06-04 19:14:51 +02:00
WireInProgressRenderer.tsx
…
WireLayer.tsx
…
WireModeBanner.tsx
…
WireRenderer.tsx
…