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

Fix: Don't trigger highlight dialogs while mouse is over another dialog #242

Merged
merged 3 commits into from
Jul 27, 2017

Conversation

pramodsum
Copy link
Contributor

  • This also prevents highlight dialogs from triggering while the mouse is over a point dialog

@@ -359,3 +386,8 @@ export function getContext(pageEl, annotationLayerClass, paddingTop, paddingBott
export function getPageEl(annotatedEl, pageNum) {
return annotatedEl.querySelector(`[data-page-number="${pageNum}"]`);
}

export function isDialogDatatype(eventTarget) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs

@@ -598,6 +598,12 @@ class DocAnnotator extends Annotator {
return;
}

// Determine if mouse is over any highlight dialog currently
// and ignore hover events of any highlights below
if (docAnnotatorUtil.isDialogDatatype(event.target)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move out of the for

Copy link
Contributor

@JustinHoldstock JustinHoldstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests for isDialogDatatype()!!

Copy link
Contributor

@JustinHoldstock JustinHoldstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize the 't' inisDialogDatatype()

isDialogDatatype() --> isDialogDataType()

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.

2 participants