Skip to content
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

Merged
merged 2 commits into from
Jul 27, 2017

Conversation

pramodsum
Copy link
Contributor

No description provided.

@@ -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;
Copy link
Contributor Author

@pramodsum pramodsum Jul 26, 2017

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

@@ -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;
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup it does!

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.

None yet

2 participants