-
Notifications
You must be signed in to change notification settings - Fork 47
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: Only show create dialog when creating new point annotations #3
Conversation
pramodsum
commented
Oct 12, 2017
•
edited
Loading
edited
@@ -231,6 +239,16 @@ class Annotator extends EventEmitter { | |||
</div>`.trim(); | |||
|
|||
this.container.appendChild(mobileDialogEl); | |||
|
|||
if (this.isModeAnnotatable(TYPES.point)) { | |||
this.createPointDialog = new CreateAnnotationDialog(this.container, { |
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.
naming?
* Events emitted by this component. | ||
* TODO(@spramod): Evaluate if these events need to be propogated to viewer | ||
*/ | ||
export const CreateEvents = { |
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.
All caps?
@@ -0,0 +1,270 @@ | |||
import EventEmitter from 'events'; |
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.
Does this fit in with our future model of using modes/controllers?
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.
This fits in with that, because this is a shared point annotation creation dialog. Right now this is just for desktop but ideally we would be just triggering this dialog w/o creating a thread for both mobile and desktop.
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.
Awesome cleanup
/** @property {HTMLElement} - The parent container to nest the dialog element in. */ | ||
parentEl; | ||
|
||
/** @property {HTMLElement} - The element containing the buttons that can creaet highlights. */ |
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.
Typo!
creaet -> create
@@ -0,0 +1,270 @@ | |||
import EventEmitter from 'events'; |
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.
Great stuff!
be1f03a
to
3fdeabb
Compare