-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: Default single page images to page 1 for annotations #249
Conversation
@@ -89,6 +89,13 @@ class ImageAnnotator extends Annotator { | |||
*/ | |||
createAnnotationThread(annotations, location, type) { | |||
let thread; | |||
|
|||
// Corrects any image annotation page number to 1 instead of -1 | |||
const fixedLocation = location; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should cover backwards compatibility for anyone who created an image annotation before this commit was merged in
a6547bb
to
a57a495
Compare
@@ -41,7 +41,7 @@ export function findClosestElWithClass(element, className) { | |||
*/ | |||
export function getPageInfo(element) { | |||
const pageEl = findClosestElWithClass(element, 'page') || null; | |||
let page = -1; | |||
let page = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure that this works. I know we do some explicit checks for page === -1
so that we can check where events occur on the page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup it does!
No description provided.