-
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 #29
Conversation
d799660
to
7dcae58
Compare
@@ -149,7 +149,7 @@ class DrawingModeController extends AnnotationModeController { | |||
* @return {void} | |||
*/ | |||
bindDOMListeners() { | |||
if (this.isTouchCompatible) { | |||
if (this.isMobile && this.hasTouch) { | |||
this.annotatedElement.addEventListener('touchstart', this.handleSelection); |
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.
what if you're on a desktop browser that has touch like a surface?
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.
Made a ticket to clarify these checks
this.createDialog.addListener(CREATE_EVENT.init, () => this.emit(THREAD_EVENT.pending, TYPES.point)); | ||
|
||
this.createDialog.addListener(CREATE_EVENT.cancel, () => { | ||
const thread = this.getThreadByID(this.pendingThreadID); |
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.
break these out into testable functions?
Initial PR comments #3 that was auto-closed by Github