Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ The PCBViewer component accepts these props:
- `editEvents`: Array of edit events to apply
- `onEditEventsChanged`: Callback when edit events change
- `initialState`: Initial state for the viewer
- `focusOnHover`: When `true`, the viewer container receives focus on mouse enter so keyboard shortcuts work without clicking first (default: `false`)
- `clickToInteractEnabled`: When `true`, user must click or tap once before pan/zoom (default: `false`)
- `debugGraphics`: Optional debug overlay payload
- `disablePcbGroups`: When `true`, PCB group UI is hidden in initial state

### Features

Expand Down
5 changes: 3 additions & 2 deletions src/examples/2025/board.fixture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const AtariBoard = () => {
)
}

export const DisabledAutoFocus = () => {
export const BoardWithoutHoverFocus = () => {
const circuit = new Circuit()

circuit.add(<board pcbX={0} pcbY={0} width="50mm" height="50mm" />)
Expand All @@ -121,7 +121,7 @@ export const DisabledAutoFocus = () => {

return (
<div style={{ backgroundColor: "black" }}>
<PCBViewer circuitJson={soup as any} />
<PCBViewer circuitJson={soup as any} focusOnHover={false} />
</div>
)
}
Expand All @@ -131,4 +131,5 @@ export default {
TriangleBoard,
OctagonBoard,
AtariBoard,
BoardWithoutHoverFocus,
}
Loading