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

Ability to reset state #21

Open
andyinabox opened this issue May 29, 2017 · 1 comment
Open

Ability to reset state #21

andyinabox opened this issue May 29, 2017 · 1 comment

Comments

@andyinabox
Copy link

I'm currently working on a project where because of an animated event the onOut callback doesn't get called. This is problematic because the following onOver event never registers. It would be nice to be able to reset the state to the "out" state.

Not sure how this would best be implemented, maybe something like

var hover = hoverintent(/* etc... */);
// ...
hover.resetState();
@hybridwebdev
Copy link

Realize I'm realllllllly late to the party, but I came across the need for this exact functionality, so I made something that does it. You can add this anywhere within the script, and then just call it via hoverintent.manualReset();

  h.manualReset= function(){
    state = 1;
    dispatchOut();
  }

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 a pull request may close this issue.

2 participants