yapamordome / scroll-drag

Scroll using mouse drag

Home Page:http://azerafati.com/scroll-drag/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular Scroll Drag Directive

Build Status npm version Issues Issues Issues License

Scroll using mouse drag

Getting started

npm i @azerafati/ngx-scroll-drag
  • Add ngxScrollDrag on a scrolling element, now that element can also be scrolled by a mouse drag.
  • The ScrollDrag Element can have a shadow if you add [scrollShadow]="true" indicating the out of view content. This uses background gradients which is perfect in most cases, unless the scrolling content is using complex z-index which might render on top of the shadow.
  • If you want to show scroll shadows and have z-index issues, wrap your scrolling element with <ngx-scroll-shadow> tag.

See the Demo

Running unit tests

Run npm test to execute the unit tests via Jest.


Development server

Run npm start for a dev server. Navigate to http://localhost:4200/.

Build

Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.

About

Scroll using mouse drag

http://azerafati.com/scroll-drag/

License:MIT License


Languages

Language:TypeScript 75.1%Language:HTML 8.9%Language:JavaScript 8.8%Language:SCSS 7.2%