Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
angular2-perfect-scrollbar
Advanced tools
Readme
This is an Angular 2 wrapper library for Perfect Scrollbar.
See a live example application here.
npm install
npm run build
cd example
npm install
npm start
npm install angular2-perfect-scrollbar --save-dev
import { PerfectScrollbarModule } from 'angular2-perfect-scrollbar';
import { PerfectScrollbarConfigInterface } from 'angular2-perfect-scrollbar';
const PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
suppressScrollX: true
};
@NgModule({
...
imports: [
...
PerfectScrollbarModule.forRoot(PERFECT_SCROLLBAR_CONFIG)
]
})
This library provides two ways to create a Dropzone element, simple component and custom directive.
COMPONENT USAGE
Simply replace the element that would ordinarily be passed to Ps.initialize
with the perfect-scollbar component.
<perfect-scrollbar class="container" [config]="config">
<div class="content">Scrollable content</div>
</perfect-scrollbar>
[config] // Custom config to override the global defaults.
DIRECTIVE USAGE
When using only the directive you need to provide your own theming or import the default theme:
@import 'https://cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/0.6.15/css/perfect-scrollbar.min.css';
Perfect scrollbar directive should be used with div elements and can take optional custom configuration:
<div [perfect-scrollbar]="config"></div>
[perfect-scrollbar] // Can be used to provide optional custom config.
wheelSpeed // Scroll speed for the mousewheel event (Default: 1).
wheelPropagation // Propagate wheel events at the end (Default: false).
swipePropagation // Propagate swipe events at the end (Default: true).
minScrollbarLength // Minimum size for the scrollbar (Default: null).
maxScrollbarLength // Maximum size for the scrollbar (Default: null).
useBothWheelAxes // Always use the both wheel axes (Default: false).
suppressScrollX // Disable X axis in all situations (Default: false).
suppressScrollY // Disable Y axis ni all situations (Default: false).
scrollXMarginOffset // Offset before enabling the X scroller (Default: 0).
scrollYMarginOffset // Offset before enabling the Y scroller (Default: 0).
stopPropagationOnClick // Stop the propagation of click event (Default: true).
For more detailed documentation with all the supported options see Perfect Scrollbar documentation.
FAQs
Angular 2 wrapper library for Perfect Scrollbar
The npm package angular2-perfect-scrollbar receives a total of 105 weekly downloads. As such, angular2-perfect-scrollbar popularity was classified as not popular.
We found that angular2-perfect-scrollbar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.