-
Notifications
You must be signed in to change notification settings - Fork 113
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
New: Allowing users to add new mobile point annotations #177
Conversation
pramodsum
commented
Jun 19, 2017
•
edited
Loading
edited
this.unbindDOMListeners(); | ||
|
||
// Cancel any unsaved annotations | ||
if (!this.hasAnnotations) { |
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 cancelAnnotation
not safe to call if there are no unsaved annotations?
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.
It's not safe to call it when there are annotations because the method not only cancels the current annotation but calls thread.destroy() if this was the only annotation left in the thread
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.
Isn't that expected behavior? If it's the only potential annotation in the thread and we cancel it then the thread should be destroyed.
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.
The reason we call thread.destroy(), is this because we create a temporary annotation, due to the limitations of the "every annotation has its own dialog" system?
* @protected | ||
* @return {void} | ||
*/ | ||
cancelAnnotation() { |
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 is a little confusing because in annotationDialog
, hideMobileDialog
is used for mobile while cancelAnnotation
is explicitly used for non mobile. Here it's used only for mobile.
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.
Yup just confused myself on which cancelAnnotation method i was referring to... I'll fix that