-
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(resin): Add annotations resin tags #1230
Conversation
mxiao6
commented
Jun 29, 2020
•
edited
Loading
edited
@@ -1099,6 +1099,7 @@ class DocBaseViewer extends BaseViewer { | |||
|
|||
if (this.areNewAnnotationsEnabled() && this.hasAnnotationCreatePermission()) { | |||
this.annotationControls.init({ | |||
fileId: this.options.file.id, |
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.
Is it possible for this value to change after init
has been called?
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.
If file id changes, the preview will be destroyed and re-init everything, right?
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.
Is that right?
src/lib/AnnotationControls.ts
Outdated
@@ -185,6 +186,12 @@ export default class AnnotationControls { | |||
groupElement, | |||
); | |||
|
|||
groupElement.setAttribute('data-resin-feature', 'annotations'); | |||
regionButton.setAttribute('data-resin-target', 'highlightRegion'); | |||
if (fileId) { |
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.
Why is this an optional parameter? What scenario would lead this value to be undefined/null? Is that scenario handled?