`NaN` is an invalid value for the `width` css style property.
- Linguagem predominante
- TypeScript
- Estrelas
- 395
- Forks
- 39
- Merge médio
- 7h 7min
- PRs com merge (30d)
- 12
Descrição
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;
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.