Skip to content

Conversation

@kevinludwig
Copy link

Hi,
I've added a feature which allows clients to page data in from the server, via an event onNeedData, which fires when the next button is clicked, if there is not enough data to display the next full slide.

Currently the only support that exists for this is reloadSlider, but this provides a very poor experience. We tried that route, and sequence of events is something like this:

  1. page to the end, displaying a partial page
  2. notice that we're at the end
  3. fetching data from the server via $.ajax call
  4. update DOM, and call reloadSlider, providing the correct start position

The visual experience is, you see the slider go to the end, displaying partial result, you see a lag, you see a flash as it reinitializes, and you see a visual "jump" as the slider resets to the right position.

So with this pull, the behavior becomes one where pressing the next button causes a tiny lag if an ajax fetch is needed, but once the animation begins its completely smooth.

Thanks!

@kevinludwig
Copy link
Author

also I should note that I didn't run grunt to build the dist files, although I have a dist branch with that if you want it instead.

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 this pull request may close these issues.

2 participants