Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-butter-scroll

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-butter-scroll

A plug and play angular directive for buttery smooth, high FPS scrolling.

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

angular-butter-scroll Build Status Coverage Status npm

A plug and play angular directive for buttery smooth, high FPS scrolling.

Why?

Browsers seriously optimize scroll operations, making scrolling buttery smooth by default. But if you scroll over a lot of elements with :hover styles, browsers have to paint and have long, unoptimized composite cycles as you scroll. These operations block the UI thread and kill FPS, making scrolly laggy and jittery.

Install

NPM

bower install angular-butter-scroll

Bower

npm install angular-butter-scroll

Usage

JS

angular
.module('foo', ['turn/angularButterScroll'])
...

HTML

<div angular-butter-scroll> ... </div>

CSS

.disable-pointer-events * {
  pointer-events: none !important;
}

How does it work?

Angular-butter-scroll works by disabling pointer events while scrolling, and re-enabling them when the user is done scrolling. It's a simple hack based on this technique.

Running the demo

Open demo/index.html in a browser

Running the tests

bower install
npm install
grunt test

Hacking it

bower install
npm install
grunt watch

Keywords

FAQs

Package last updated on 23 Dec 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc