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(resin): Add annotations resin tags #1230

Merged
merged 3 commits into from
Jun 30, 2020
Merged

Conversation

mxiao6
Copy link
Contributor

@mxiao6 mxiao6 commented Jun 29, 2020

image

@mxiao6 mxiao6 requested a review from a team as a code owner June 29, 2020 21:02
@@ -1099,6 +1099,7 @@ class DocBaseViewer extends BaseViewer {

if (this.areNewAnnotationsEnabled() && this.hasAnnotationCreatePermission()) {
this.annotationControls.init({
fileId: this.options.file.id,
Copy link
Collaborator

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

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 Show resolved Hide resolved
@@ -185,6 +186,12 @@ export default class AnnotationControls {
groupElement,
);

groupElement.setAttribute('data-resin-feature', 'annotations');
regionButton.setAttribute('data-resin-target', 'highlightRegion');
if (fileId) {
Copy link
Collaborator

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?

@mergify mergify bot merged commit 6312e28 into box:master Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants