Skip to content

Commit 2c7e96e

Browse files
Add titles
1 parent accf9d8 commit 2c7e96e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Visualizer.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,11 @@ function toFlowEdges(layout: MyELKNodeLayedOut): FlowEdge[] {
289289

290290
export function EClassNode({ data }: NodeProps<FlowClass>) {
291291
return (
292-
<div className="rounded-md border border-dotted border-black h-full w-full" style={{ backgroundColor: data.color! || "white" }}>
292+
<div
293+
className="rounded-md border border-dotted border-black h-full w-full"
294+
style={{ backgroundColor: data.color! || "white" }}
295+
title={data.id}
296+
>
293297
{/* <MyNodeToolbar type="class" id={data.id} selected={data.selected} /> */}
294298
<Handle type="target" position={Position.Top} className="invisible" />
295299
</div>
@@ -308,7 +312,11 @@ export function ENode(
308312
<div className="p-1 rounded-md border bg-white border-black h-full w-full" ref={props?.outerRef}>
309313
{/* {props?.outerRef ? <></> : <MyNodeToolbar type="class" id={props!.data!.id} selected={props!.data!.selected} />} */}
310314

311-
<div className="font-mono text-xs truncate max-w-96 min-w-4 text-center" ref={props?.innerRef}>
315+
<div
316+
className="font-mono text-xs truncate max-w-96 min-w-4 text-center"
317+
title={`${props?.data?.id}\n${props?.data?.label}`}
318+
ref={props?.innerRef}
319+
>
312320
{props?.data?.label}
313321
</div>
314322
{/* Only show handle if we aren't rendering this to calculate size */}

0 commit comments

Comments
 (0)