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

Refactor to support more options, generate some cleaner DOM elements, handle more dynamic pages, etc. #1

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

Conversation

andyburke
Copy link

This is a pretty significant change, I understand if you don't want to merge it back. Changes are:

  • Don't wrap elements, instead insert a display: block placeholder after the element that is hidden and shown appropriately.
  • Allow for many more configuration options, eg: zIndexBase, zIndexManagement, boundary -> top, className, placeholderClassName, fn -> stuck, unstuck callback
  • Don't grab original y offset of the element, since this could change with dynamic pages where elements are inserted and removed. Instead, look at the appropriate sibling (previous sibling bottom) or parent (parent's top) for the right location to compare to the scroll value.
  • Remove the standalone version, bring that code into the main index.js

I'm open to any feedback. Again, I realize this is a big change and totally understand if this should just stay as a standalone fork.

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.

1 participant