diff --git a/lib/components/SchematicViewer.tsx b/lib/components/SchematicViewer.tsx index ab4fd20..e4a9688 100644 --- a/lib/components/SchematicViewer.tsx +++ b/lib/components/SchematicViewer.tsx @@ -31,6 +31,7 @@ import { getStoredBoolean, setStoredBoolean } from "lib/hooks/useLocalStorage" import { MouseTracker } from "./MouseTracker" import { SchematicComponentMouseTarget } from "./SchematicComponentMouseTarget" import { SchematicPortMouseTarget } from "./SchematicPortMouseTarget" +import { useSchematicTraceHover, HIGHLIGHT_COLOR } from "../hooks/useSchematicTraceHover" interface Props { circuitJson: CircuitJson @@ -166,6 +167,7 @@ export const SchematicViewer = ({ const svgDivRef = useRef(null) const touchStartRef = useRef<{ x: number; y: number } | null>(null) + useSchematicTraceHover({ svgDivRef }) const schematicComponentIds = useMemo(() => { try { @@ -401,6 +403,14 @@ export const SchematicViewer = ({ {`.schematic-component-clickable [data-schematic-component-id]:hover { cursor: pointer !important; }`} )} + {onSchematicPortClicked && (