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

Custom snapshot resolvers #18

Open
kettanaito opened this issue Nov 23, 2017 · 0 comments
Open

Custom snapshot resolvers #18

kettanaito opened this issue Nov 23, 2017 · 0 comments
Labels
Milestone

Comments

@kettanaito
Copy link
Owner

What

Need to consider custom snapshot resolvers.

Why

This would allow the most flexibility in the tracking logic.

How

new Observer({
  snapshots: [
    thresholdX: 25, // this is available under "snapshot.thresholdX"
    resolver: ({ targetRect, boundsRect, snapshot }) => {
       // custom logic which should return Boolean
    },
    callback() {}
  ]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant