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

New: Allowing users to add new mobile point annotations #177

Merged
merged 4 commits into from
Jun 26, 2017
Merged

New: Allowing users to add new mobile point annotations #177

merged 4 commits into from
Jun 26, 2017

Conversation

pramodsum
Copy link
Contributor

@pramodsum pramodsum commented Jun 19, 2017

mobile - new points

this.unbindDOMListeners();

// Cancel any unsaved annotations
if (!this.hasAnnotations) {
Copy link
Contributor

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?

Copy link
Contributor Author

@pramodsum pramodsum Jun 21, 2017

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

Copy link
Contributor

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.

Copy link
Contributor

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() {
Copy link
Contributor

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.

Copy link
Contributor Author

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

@pramodsum pramodsum merged commit 56bbbf9 into box:master Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants