`NaN` is an invalid value for the `width` css style property.
- Lingua principale
- TypeScript
- Stelle
- 395
- Fork
- 39
- Merge medio
- 7h 7m
- PR unite (30g)
- 12
Descrizione
initial search result jump is causing console error, next jumps are fine
```
import { calculateHighlightRects, SearchResult, usePdf, usePdfJump } from "@unriddle-ai/lector";
const usePdfPreview = () => {
const { jumpToHighlightRects } = usePdfJump();
const getPdfPageProxy = usePdf(state => state.getPdfPageProxy);
const jumpToText = async (result: SearchResult) => {
const pageProxy = getPdfPageProxy(result.pageNumber);
const rects = await calculateHighlightRects(pageProxy, {
pageNumber: result.pageNumber,
text: result.text,
matchIndex: result.matchIndex,
});
jumpToHighlightRects(rects, "pixels");
};
return { jumpToText };
};
export default usePdfPreview;
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.