Skip to content

Allows the ability to annotate entire page#3

Merged
vsanse merged 2 commits intomasterfrom
highlight-page-on-index-available
Dec 4, 2024
Merged

Allows the ability to annotate entire page#3
vsanse merged 2 commits intomasterfrom
highlight-page-on-index-available

Conversation

@vsanse
Copy link
Copy Markdown
Collaborator

@vsanse vsanse commented Dec 4, 2024

Allows the ability to annotate entire page where operator and glyph values are not present but page index is available

@vsanse vsanse merged commit acd5106 into master Dec 4, 2024
const pageData = await data.getPage(1);
setDefaultHeight(pageData.view[3]);
setDefaultWidth(pageData.view[2]);
const width = Math.min(pageData.view[2], props.defaultWidth || pageData.view[2]);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Props.defaultWidth can be undefined at one point. This means there a chance that width is Nan

setLoaded(true);
props.onLoadSuccess?.(data);
}, [props.onLoadSuccess, bboxes]);
}, [props.onLoadSuccess, bboxes, props.defaultHeight, props.defaultWidth]);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see defaultHeight being used anywhere. This can cause potential issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants