@@ -188,11 +229,7 @@ const LinkToolbar: React.FC
= React.memo(
e.stopPropagation();
onNavigate(annotationLink);
}}
- aria-label={
- internal
- ? `Go to page ${annotationLink.target?.type === "destination" ? annotationLink.target.destination.pageIndex + 1 : ""}`
- : "Open link"
- }
+ aria-label={internal ? `Go to ${label}` : "Open link"}
title={label}
>
{internal ? : }
@@ -223,7 +260,11 @@ export const LinkLayer: React.FC = ({
const documentState = useDocumentState(documentId);
const [hoveredLinkId, setHoveredLinkId] = useState(null);
+ const [toolbarPlacement, setToolbarPlacement] =
+ useState(null);
const leaveTimerRef = useRef | null>(null);
+ const linkElementRefs = useRef