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

Added auto-scroll, scroll prevention (to help Vue2-Dragula on mobile), size recalculation on component updates #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tmcdos
Copy link

@tmcdos tmcdos commented Sep 28, 2018

  1. scrollbar size is recalculated when the component is updated (usually content is added or removed)
  2. width of horizontal scrollbar is reduced from 100% when the vertical scrollbar is visible to avoid their mutual overlapping
  3. height of vertical scrollbar is reduced from 100% when the horizontal scrollbar is visible to avoid their overlapping
  4. scrollbar position is properly updated when it was at 100% and inner content was removed (otherwise you can no longer scroll - the slider gets stuck at the end)
  5. got rid of document listeners - they are needless as we only want to scroll our container, not the whole page
  6. added ability for auto-scrolling (e.g. when used in combination with Vue2-Dragula)
  7. added ability to prevent scrolling on mobile (e.g. when dragging items through Vue2-Dragula) - otherwise the scrolling takes precedence over dragging (on mobile only)
  8. added computed properties to show whether the horizontal or vertical scrollbars are currently visible
  9. the component emits events during scrolling - "scrollx" for horizontal, "scrolly" for vertical and "scroll" for any of them

…lly content is added or removed)

2) width of horizontal scrollbar is reduced from 100% when the vertical scrollbar is visible to avoid their mutual overlapping
3) height of vertical scrollbar is reduced from 100% when the horizontal scrollbar is visible to avoid their overlapping
4) scrollbar position is properly updated when it was at 100% and inner content was removed (otherwise you can no longer scroll - the slider gets stuck at the end)
5) got rid of document listeners - they are needless as we only want to scroll our container, not the whole page
6) added ability for auto-scrolling (e.g. when used in combination with Vue2-Dragula)
7) added ability to prevent scrolling on mobile (e.g. when dragging items through Vue2-Dragula) - otherwise the scrolling takes precedence over dragging (on mobile only)
8) added computed properties to show whether the horizontal or vertical scrollbars are currently visible
10) the component emits events during scrolling - "scrollx" for horizontal, "scrolly" for vertical and "scroll" for any of them
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