-
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
fix(discoverability): set mode to REGION instead of NONE #1260
fix(discoverability): set mode to REGION instead of NONE #1260
Conversation
src/lib/viewers/BaseViewer.js
Outdated
@@ -915,7 +917,9 @@ class BaseViewer extends EventEmitter { | |||
|
|||
disableAnnotationControls() { | |||
if (this.annotator && this.annotationControls && this.areNewAnnotationsEnabled()) { | |||
this.annotator.toggleAnnotationMode(AnnotationMode.NONE); | |||
this.annotator.toggleAnnotationMode( |
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.
Something that I noticed is that we have two toggleAnnotationMode
method calls being made in the
handleFullscreenEnter
-> disableAnnotationControls
flow. My thinking is that either the first or second is redundant?
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.
Good point. I think the first is redundant. @jstoffan can you confirm?
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.
I'm not sure. It seems like these changes somewhat defeat the purpose of the original code, which was to forcibly disallow annotation creation. What effect does this have on creating annotations on rotated images, for example?
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.
My change was not in the right location, so I have moved it over to handleFullScreenExit instead.
I notice there is another |
I'm not sure if we want to move all of the |
Demo: