Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Eliminate repeatedly fired rangechanged events on mousewheel #2989

Merged
merged 28 commits into from
May 1, 2017

Conversation

yotamberk
Copy link
Contributor

fixes #397.

Notice that in the vis/examples/timeline/interaction/eventListeners.html the rangechanged event is fired only at the end of a paused range change. The pause is hardcoded to be 200ms (standard default pause for a human reaction as given in jQuery and etc.)
You might notice that the example loads with an initial log of a rangechanged event. I'm not 100% sure why only that event is fired whilst the others are not registered. They are all called on initial redraw. I guess this happens because of the setTimeout called (added with this PR) causes the code to have a cycle digest (a tick occurs) and then emits the events which causes the registration of that event in the log. In any case, this is not a big deal at all. The feature is much more important than the side-effect.

Copy link
Contributor

@wimrijnders wimrijnders left a comment

Choose a reason for hiding this comment

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

LGTM

@yotamberk yotamberk merged commit 77699b4 into almende:develop May 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants