Git Product home page Git Product logo

Comments (1)

MurhafSousli avatar MurhafSousli commented on July 3, 2024

The wheel already work natively since it's a scrollable layout, however, for horizontal scroll you need to press shift while scrolling. I am not sure if there is a native way to make it work without the shift.

The problem with the wheel event that it ruins the the touchpad horizontal scroll as in this example https://dev.to/juanbelieni/how-to-create-horizontal-scroll-with-mouse-wheel-using-javascript-4cm5

The way I would prefer such addition is if we make it work by applying an external directive on the gallery and avoid adding the logic inside the component itself. I would hold on until next version.

For the second feature, it is on my radar, however for this to work we have to implement a pagination feature in the gallery.

I have implemented this in another abandoned carousel plugin I never released
Check the demo here and here and try to slide the thumbnails.

The galleryRef state would like:

export interface GalleryState {
  total?: number;
  perPage?: number;
  hasNextItem?: boolean;
  hasPrevItem?: boolean;
  activeItem?: number;
  activePage?: number;
  pages?: CarouselItem[];
}

For example you set perPage to 5, which means 5 items per page (slide).

You can navigate by item, or by page. I think when this is implemented we can easily add the secondary nav on thumbnails

BTW, I am releasing a beta version which I am currently working on in this branch https://github.com/MurhafSousli/ngx-gallery/tree/next, if you want to try out it use the storybook npm task to run the project

from ngx-gallery.

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.