`NaN` is an invalid value for the `width` css style property.
未關閉
- 主要語言
- TypeScript
- 星號
- 395
- 分支
- 39
- 平均合併
- 7 小時 7 分鐘
- 30 天內合併 PR
- 12
描述
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;
```
貢獻指南
評估
這個 Issue 還沒有評估資料。