Skip to content

Commit

Permalink
fix: unable to hover/click entire label (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
benwaples authored Mar 6, 2025
1 parent cc2d15d commit 1733c08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/ui/src/components/GraphEdgeEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ const GraphEdgeEvents: FC = () => {
const x2 = x1 + width;
const y2 = y1 + height;

const offsetY = edgeLabelsCanvas.getBoundingClientRect().y;
const offsetX = edgeLabelsCanvas.getBoundingClientRect().x;
const { x: viewportX, y: viewportY } = {
x: event.clientX,
y: event.clientY - offsetY,
x: event.clientX - offsetX,
y: event.clientY,
};

//Check if the click happened within the bounds of the label
Expand Down

0 comments on commit 1733c08

Please sign in to comment.