Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Horizontal Scroll Demo #49

Open
ashthornton opened this issue May 4, 2021 · 8 comments
Open

Horizontal Scroll Demo #49

ashthornton opened this issue May 4, 2021 · 8 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ashthornton
Copy link
Owner

No description provided.

@ashthornton ashthornton added the documentation Improvements or additions to documentation label May 4, 2021
@ashthornton ashthornton added this to the 2.0 milestone May 4, 2021
@ashthornton ashthornton self-assigned this May 4, 2021
@ashthornton ashthornton removed this from the 2.0 milestone May 6, 2021
@S-n-d
Copy link

S-n-d commented May 13, 2021

Hey Ash, if you could point us in the right direction regarding horizontal scrolling that would be awesome! I've been tinkering with it but it looks like it's currently unfinished? If I set the <main asscroll-container> width manually it works, but there's no calculation happening as of yet, right?

@ashthornton
Copy link
Owner Author

Hey @S-n-d, it is functional, you just need the right set up. Usually this can be done with flex and setting the elements to not grow or shrink so they render at their natural width, which would cause a horizontal overflow of the ASScroll container element. I will see if I can put together a quick demo over the next day or two.

@S-n-d
Copy link

S-n-d commented May 17, 2021

@ashthornton thanks for giving a nudge in the right direction. Looking forward to the demo!

@grommas
Copy link

grommas commented Jun 24, 2021

It’s only possible to activate horizontalScroll within asscroll.enable, right? Is the horizontal scroll only possible with vertical input (touchpad) and with a vertical scrollbar, or am I doing something wrong? Would be nice if we could define the orientation directly when defining the new ASScroll instance or if we could at least change the input and scrollbar direction inside asscroll.enable. I think it’s not intuitive to mix up the directions, even though I would like to let the site be scrolled with vertical as well as horizontal input.

@ashthornton
Copy link
Owner Author

Hi @grommas, are you asking if it would be possible to scroll with a horizontal mouse wheel? Or if you could just change the scrollbar location to the bottom and the orientation to horizontal, when in horizontal mode?

@grommas
Copy link

grommas commented Jul 3, 2021

Hi @ashthornton, thanks for your reply. Both!

@ashthornton
Copy link
Owner Author

@grommas so the current horizontal scroll functionality is designed to work the way it does now - moving the page horizontally based on vertical scroll position. It's a design decision based on the fact that it is uncommon to have a horizontal scroll wheel on a mouse but I also wanted to allow horizontal page movement.

I think it could be nice if ASScroll detects whether the page has X or Y overflow and adjusts the scrollbar orientation and scroll behaviour accordingly. But this would also need to be interchangeable with allowing horizontal scroll to be controlled with a vertical mouse wheel when required.

It's definitely something I will consider adding in the future, but isn't a priority right now.

@grommas
Copy link

grommas commented Jul 27, 2021

Thanks for your answer! I think for trackpad users it’s logical to scroll the x-axis with horizontal swipes. I totally understand, that vertical scroll inputs make sense for some design decisions, but for others it may break with the intention of native horizontal scroll elements.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants