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

Improved load-on-pan events #690

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

johanhenriksson
Copy link

This is an initial implementation of the fix suggested in issue #688

3 new events have been added:

  • onLoad, called when panning in either direction
  • onLoadBefore, called only when panning left (replacing onLoadMore)
  • onLoadAfter, called only when panning right

I have left onLoadMore unchanged for now, so that this fix wont break anything. If we go this route, I recommend deprecating it as soon as possible to make the API more consistent.

Alternatively, we break backwards compatibility and use onLoadMore for everything 😄

@aleksspeaker
Copy link

Good luck with this PR. Unfortunately, @rrag didn't answer to any PR for a long time. So people ended up forking and using their own versions.

@payala
Copy link

payala commented Jan 2, 2019

@aleksspeaker would you recommend any fork in particular? I like this library, but the fact that it doesn't seem to be maintained is a concern. Thanks!

@aleksspeaker
Copy link

aleksspeaker commented Jan 7, 2019

Hi @payala ,
Yea, I guess so.
There are plenty of forks of this lib in NPM. So I assume everybody does that.

const start = head(xScale.domain());
const end = xAccessor(firstItem);
const scale_start = head(xScale.domain());
const data_start = xAccessor(firstItem);
// console.log(start, end, start < end ? "Load more" : "I have it");

Choose a reason for hiding this comment

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

Commented code should not be pushed to GitHub.

Choose a reason for hiding this comment

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

Dude, this repo is dead.

Copy link
Author

Choose a reason for hiding this comment

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

... and the comment isn't even part of the PR 😂

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.

4 participants