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

rangechanged event fires repeatedly on zoom in timeline #397

Closed
JoakimSoderberg opened this issue Oct 23, 2014 · 2 comments
Closed

rangechanged event fires repeatedly on zoom in timeline #397

JoakimSoderberg opened this issue Oct 23, 2014 · 2 comments
Assignees

Comments

@JoakimSoderberg
Copy link

JoakimSoderberg commented Oct 23, 2014

First of all, awesome library!

When dragging the timeline, the rangechange event fires continuously and rangechanged fires only once when you stop.

However, when zooming rangechanged keeps firing continuously, not only when the zoom has finished.

Is this intentional? Because it would be nice to have the same behaviour when zooming. I'm sending the time range shown in the timeline via websocket to the server on the rangechanged event which then returns all events in that range. I would prefer this happening once the zoom action has finished, instead of continuously.

P.S.
@lnilsen in #346 mentioned having an event that differentiates between rangechange events when zooming and dragging the timeline, maybe this could be a new type of event?

@JoakimSoderberg
Copy link
Author

Since there is no event for telling when the zoom via the mousewheel has ended, this method is an option: http://stackoverflow.com/questions/3515446/jquery-mousewheel-detecting-when-the-wheel-stops

And I guess something similar will work for pinch zooming as well...

@josdejong
Copy link
Contributor

Thanks for the tip @JoakimSoderberg, good idea to fire the rangechanged event only after no scroll event has occurred after some delay of say 250ms.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants