Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

initElem: setHover only if attrsHover set #176

Merged
merged 1 commit into from
Dec 22, 2015

Conversation

Indigo744
Copy link
Collaborator

In this PR, I propose:

  • code factorization of the calls to setEventHandlers and setHover: they can be called once. The check to textElem to undefined is also done in their respective function.
  • [inspired from [newb] disable plot aimations & zooming #160] Call to setHover() (which effectively attach mouseIn/Out events handler to the element) only if attrsHover is set for the area or for the textElem. With this way, if a user has overrided the defaultOptions attrsHover with an empty object, we don't assign any useless events.

neveldo added a commit that referenced this pull request Dec 22, 2015
initElem: setHover only if attrsHover set
@neveldo neveldo merged commit 66bc2cf into neveldo:master Dec 22, 2015
@Indigo744 Indigo744 deleted the setHover-only-if-attrsHover branch December 22, 2015 17:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants