Giter Site home page Giter Site logo

Horizontal Scroll Demo about asscroll HOT 8 OPEN

ashthornton avatar ashthornton commented on August 18, 2024
Horizontal Scroll Demo

from asscroll.

Comments (8)

ashthornton avatar ashthornton commented on August 18, 2024 1

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.

from asscroll.

S-n-d avatar S-n-d commented on August 18, 2024

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?

from asscroll.

S-n-d avatar S-n-d commented on August 18, 2024

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

from asscroll.

grommas avatar grommas commented on August 18, 2024

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.

from asscroll.

ashthornton avatar ashthornton commented on August 18, 2024

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?

from asscroll.

grommas avatar grommas commented on August 18, 2024

Hi @ashthornton, thanks for your reply. Both!

from asscroll.

ashthornton avatar ashthornton commented on August 18, 2024

@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.

from asscroll.

grommas avatar grommas commented on August 18, 2024

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.

from asscroll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.