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: Paging draw threads in the controller's internal thread map #6

Merged
merged 7 commits into from
Oct 31, 2017
Merged

Chore: Paging draw threads in the controller's internal thread map #6

merged 7 commits into from
Oct 31, 2017

Conversation

pramodsum
Copy link
Contributor

@pramodsum pramodsum force-pushed the master branch 18 times, most recently from b5efd2a to 3521db1 Compare October 25, 2017 02:47
@@ -64,7 +64,12 @@ class AnnotationModeController extends EventEmitter {
* @return {void}
*/
registerThread(thread) {
this.threads.push(thread);
const page = thread.location.page || 1; // Defaults to page 1 if thread has no page'
Copy link
Contributor

Choose a reason for hiding this comment

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

why would we default to page 1, shouldn't we throw an error if there is no page?

Copy link
Contributor Author

@pramodsum pramodsum Oct 31, 2017

Choose a reason for hiding this comment

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

As far as I remember, this was done so that we could allow for annotations on viewers w/o actual pages such as the media viewer, text viewer, etc. We defaulted to 1 page for those cases

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to make a change so that we default to null, in the case that we have an annotation that doesn't require pages? It might want to do it in another PR, though. Or do it now...

ie) video, audio, 3D models

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm ok with re-visiting this in another PR. I'll make a ticket for myself 👍

@@ -3,7 +3,7 @@ import { insertTemplate } from './annotatorUtil';

class AnnotationModeController extends EventEmitter {
/** @property {Array} - The array of annotation threads */
Copy link
Contributor

Choose a reason for hiding this comment

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

Update comment, maybe also add what the key and values should be?

@@ -64,7 +64,12 @@ class AnnotationModeController extends EventEmitter {
* @return {void}
*/
registerThread(thread) {
this.threads.push(thread);
const page = thread.location.page || 1; // Defaults to page 1 if thread has no page'
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to make a change so that we default to null, in the case that we have an annotation that doesn't require pages? It might want to do it in another PR, though. Or do it now...

ie) video, audio, 3D models

@pramodsum pramodsum merged commit fc52e9e into box:master Oct 31, 2017
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