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

Support hover events #44

Merged
merged 1 commit into from
Dec 2, 2016

Conversation

compwright
Copy link
Collaborator

Also fixes a click event duplication when a dblclick event happens.

Also fixes a click event duplication when a dblclick event happens
@compwright compwright force-pushed the feature-annotation-events branch from 39dfe70 to 816d253 Compare December 1, 2016 21:35
@@ -124,6 +123,12 @@ Vertical or horizontal lines are supported.

// Mouse event handlers - be sure to enable the corresponding events in the
// annotation events array or the event handler will not be called.
// See https://developer.mozilla.org/en-US/docs/Web/Events for a list of
// supported mouse events.
onMouseenter: function(e) {},
Copy link
Member

Choose a reason for hiding this comment

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

Would it be a good idea to support touch events as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Eventually, yes, but it will need some care to do it right in a way that works cross-browser and also works for the user. Probably need some hit radius logic added, and integration with Hammer.js. That's more than I can get into right now.

}
}

// Suppress duplicate click events during a double click
Copy link
Member

Choose a reason for hiding this comment

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

I like this comment. Very detailed :)

@compwright compwright merged commit 5d14e26 into chartjs:master Dec 2, 2016
compwright added a commit to compwright/chartjs-plugin-annotation that referenced this pull request Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants