New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-snapscroll

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-snapscroll - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

4

bower.json
{
"name": "angular-snapscroll",
"version": "1.0.2",
"version": "1.1.0",
"authors": [

@@ -30,5 +30,5 @@ "Joel Mukuthu <joelmukuthu@gmail.com>"

"angular-scrollie": "^1.0.0",
"angular-wheelie": "^2.0.0"
"angular-wheelie": "^2.1.0"
},
"homepage": "https://github.com/joelmukuthu/angular-snapscroll.git"
}

@@ -0,1 +1,7 @@

## 1.1.0
### Features
- Support ignoring wheel events from specified elements with
[`ignore-wheel-class`](DOCS.md#ignore-wheel-class)
## 1.0.2

@@ -2,0 +8,0 @@

/**
* angular-snapscroll
* Version: 1.0.2
* Version: 1.1.0
* (c) 2014-2016 Joel Mukuthu
* MIT License
* Built on: 10-11-2016 11:54:12 GMT+0100
* Built on: 10-11-2016 18:25:46 GMT+0100
**/

@@ -501,3 +501,3 @@

}
});
}, scope.ignoreWheelClass);
}

@@ -743,2 +743,4 @@

scope.ignoreWheelClass = attributes.ignoreWheelClass;
if (element.css('overflowY') !== 'scroll') {

@@ -745,0 +747,0 @@ element.css('overflowY', 'auto');

@@ -1,2 +0,2 @@

/* angular-snapscroll v1.0.2, (c) 2014-2016 Joel Mukuthu, MIT License, built: 10-11-2016 11:54:12 GMT+0100 */
!function(){angular.module("snapscroll",["wheelie","scrollie"]).value("defaultSnapscrollScrollEasing",void 0).value("defaultSnapscrollScrollDelay",250).value("defaultSnapscrollSnapDuration",800).value("defaultSnapscrollResizeDelay",400).value("defaultSnapscrollBindScrollTimeout",400).value("defaultSnapscrollPreventDoubleSnapDelay",1e3)}(),function(){angular.module("snapscroll").directive("fitWindowHeight",["$window","$timeout","defaultSnapscrollResizeDelay",function(a,b,c){return{restrict:"A",require:"snapscroll",link:function(d,e,f,g){function h(){l===!1?g.setSnapHeight(a.innerHeight):(b.cancel(k),k=b(function(){g.setSnapHeight(a.innerHeight)},l))}function i(){"false"===l?l=!1:(l=parseInt(l,10),isNaN(l)&&(l=c)),g.setSnapHeight(a.innerHeight),j=angular.element(a),j.on("resize",h),d.$on("$destroy",function(){j.off("resize")})}var j,k,l=f.resizeDelay;i()}}}])}(),function(){function a(a){return angular.isNumber(a)&&!isNaN(a)}var b=angular.isDefined,c=angular.isUndefined,d=angular.isFunction,e=angular.forEach,f={enabled:"=snapscroll",snapIndex:"=?",snapHeight:"=?",beforeSnap:"&",afterSnap:"&",snapAnimation:"=?"},g=["$scope",function(a){this.setSnapHeight=function(b){a.snapHeight=b}}],h=["$timeout","$document","wheelie","scrollie","defaultSnapscrollScrollEasing","defaultSnapscrollScrollDelay","defaultSnapscrollSnapDuration","defaultSnapscrollBindScrollTimeout","defaultSnapscrollPreventDoubleSnapDelay",function(h,i,j,k,l,m,n,o,p){return{restrict:"A",scope:f,controller:g,link:function(f,g,q){function r(){return g.children()}function s(a){return a.offsetHeight}function t(a){return s(r()[a])}function u(){return s(g[0])}function v(){return g[0].scrollHeight}function w(a){var b=v()-u();return a>b?b:a}function x(a,c){for(var d=a[0],e=a[1],f=0,g=r(),h=0;h<d;h++)f+=s(g[h]);if(0===e)return w(f);var i,j=u(),k=s(g[d]);if(b(c)&&e<c[1]){i=k;for(var l=e;l>=0;l--)i-=j}else{i=0;for(var m=0;m<e;m++)i+=j;var n=i+j-k;n>0&&(i-=n)}return w(f+i)}function y(d,e){var g=d[0],h=c(e)||g!==e[0];if(h){var i=f.beforeSnap({snapIndex:g});if(i===!1)return void(b(e)&&(f.ignoreCompositeIndexChange=!0,f.compositeIndex=e));if(a(i))return void(f.snapIndex=i)}return A(x(d,e)).then(function(){h&&f.afterSnap({snapIndex:g})})}function z(){return g[0].scrollTop}function A(a){var b;b=f.snapAnimation?c(f.snapEasing)?[g,a,f.snapDuration]:[g,a,f.snapDuration,f.snapEasing]:[g,a];var d=z();return a>d?f.snapDirection="down":a<d?f.snapDirection="up":f.snapDirection="same",Z(),k.to.apply(k,b).then(function(){f.snapDirection=void 0,$(),B()})}function B(){function a(){f.preventUp=!1,f.preventDown=!1}(f.preventUp||f.preventDown)&&(f.preventDoubleSnapDelay===!1?a():h(a,f.preventDoubleSnapDelay))}function C(){var a=u();if(!a)return!1;var b=r();if(!b.length)return!1;var c=0;return e(b,function(a){c+=s(a)}),!(c<a)}function D(a){return a>=0&&a<=r().length-1}function E(b,d){if(C())return c(b)?void(f.snapIndex=0):a(b)?b%1!==0?void(f.snapIndex=Math.round(b)):f.ignoreSnapIndexChange===!0?void(f.ignoreSnapIndexChange=void 0):D(b)?void(f.compositeIndex=[b,0]):(D(d)||(d=0),f.ignoreSnapIndexChange=!0,void(f.snapIndex=d)):(a(d)||(d=0),void(f.snapIndex=d))}function F(){f.unwatchSnapIndex=f.$watch("snapIndex",E)}function G(){d(f.unwatchSnapIndex)&&(f.unwatchSnapIndex(),f.unwatchSnapIndex=void 0)}function H(a,b){if(!c(a)){var d=a[0];return f.snapIndex!==d&&(f.ignoreSnapIndexChange=!0,f.snapIndex=d),f.ignoreCompositeIndexChange===!0?void(f.ignoreCompositeIndexChange=void 0):void y(a,b)}}function I(){f.unwatchCompositeIndex=f.$watchCollection("compositeIndex",H)}function J(){d(f.unwatchCompositeIndex)&&(f.unwatchCompositeIndex(),f.unwatchCompositeIndex=void 0)}function K(a){var b=u(),c=t(a);if(c<=b)return 0;var d=parseInt(c/b,10);return c%b===0&&(d-=1),d}function L(a){var b=a[0],c=a[1];return c<0?D(b-1):!(c>K(b))||D(b+1)}function M(a){var b=a[0],c=a[1];return c<0?[b-1,K(b-1)]:c>K(b)?[b+1,0]:a}function N(a,b){if(C()){if("up"===a&&(f.preventDown=!1),"down"===a&&(f.preventUp=!1),f.snapDirection===a)return!0;if(f.preventUp||f.preventDown)return!0;var c,d=f.compositeIndex[0],e=f.compositeIndex[1];"up"===a&&(c=e-1),"down"===a&&(c=e+1);var g=[d,c];if(L(g))return"wheel"===b&&("up"===a&&(f.preventUp=!0),"down"===a&&(f.preventDown=!0)),f.$apply(function(){f.compositeIndex=M(g)}),!0}}function O(a){return N("up",a)}function P(a){return N("down",a)}function Q(){j.bind(g,{up:function(a){a.preventDefault(),O("wheel")&&a.stopPropagation()},down:function(a){a.preventDefault(),P("wheel")&&a.stopPropagation()}})}function R(){j.unbind(g)}function S(a,b){a.css("height",b+"px")}function T(d,h){if(!c(d)){if(!a(d))return void(a(h)&&(f.snapHeight=h));S(g,d),e(r(),function(a){S(angular.element(a),d)}),b(f.snapIndex)&&(c(f.compositeIndex)&&(f.compositeIndex=[f.snapIndex,0]),y(f.compositeIndex))}}function U(){f.unwatchSnapHeight=f.$watch("snapHeight",T)}function V(){d(f.unwatchSnapHeight)&&(f.unwatchSnapHeight(),f.unwatchSnapHeight=void 0)}function W(a){var b=0,c=0;if(a>0){b=-1;for(var d,e=r();a>0;)d=s(e[++b]),a-=d;var f=u();if(d>f){for(a+=d-f,a>=f&&c++;a>0;)c++,a-=f;f/2>=-a&&(c+=1)}else d/2>=-a&&(b+=1)}return M([b,c])}function X(){function a(){var a=W(z());f.compositeIndex[0]===a[0]&&f.compositeIndex[1]===a[1]?y(f.compositeIndex):f.$apply(function(){f.compositeIndex=a})}k.stop(g),f.scrollDelay===!1?a():(h.cancel(f.scrollPromise),f.scrollPromise=h(function(){a(),f.scrollPromise=void 0},f.scrollDelay))}function Y(){if(!f.preventSnappingAfterManualScroll&&!f.scrollBound){if(b(f.snapDirection))return void $();g.on("scroll",X),f.scrollBound=!0}}function Z(){f.scrollBound&&(g.off("scroll",X),f.scrollBound=!1)}function $(){f.preventSnappingAfterManualScroll||(f.bindScrollPromise&&h.cancel(f.bindScrollPromise),f.bindScrollPromise=h(function(){Y(),f.bindScrollPromise=void 0},o))}function _(a){a.originalEvent&&(a=a.originalEvent);var b,c=a.keyCode;38===c&&(b=O),40===c&&(b=P),b&&(a.preventDefault(),b())}function aa(){f.enableArrowKeys&&!f.arrowKeysBound&&(i.on("keydown",_),f.arrowKeysBound=!0)}function ba(){f.arrowKeysBound&&(i.off("keydown",_),f.arrowKeysBound=!1)}function ca(){var a=q.scrollDelay;"false"===a?f.scrollDelay=!1:(a=parseInt(a,10),isNaN(a)&&(a=m),f.scrollDelay=a);var e=q.preventDoubleSnapDelay;"false"===e?f.preventDoubleSnapDelay=!1:(e=parseInt(e,10),isNaN(e)&&(e=p),f.preventDoubleSnapDelay=e);var h=q.snapEasing;b(h)?f.snapEasing=f.$parent.$eval(h):d(l)&&(f.snapEasing=l);var i=parseInt(q.snapDuration,10);isNaN(i)&&(i=n),f.snapDuration=i,c(f.snapAnimation)&&(f.snapAnimation=!0),f.enableArrowKeys=b(q.enableArrowKeys),f.preventSnappingAfterManualScroll=b(q.preventSnappingAfterManualScroll),"scroll"!==g.css("overflowY")&&g.css("overflowY","auto"),f.$watch("enabled",function(a,b){function c(){f.preventSnappingAfterManualScroll||(f.compositeIndex=W(z()))}a!==!1?(b===!1&&c(),I(),F(),U(),Y(),Q(),aa()):(J(),G(),V(),Z(),R(),ba())}),f.$on("$destroy",function(){f.enabled!==!1&&(Z(),R(),ba())})}ca()}}}];angular.module("snapscroll").directive("snapscroll",h)}();
/* angular-snapscroll v1.1.0, (c) 2014-2016 Joel Mukuthu, MIT License, built: 10-11-2016 18:25:46 GMT+0100 */
!function(){angular.module("snapscroll",["wheelie","scrollie"]).value("defaultSnapscrollScrollEasing",void 0).value("defaultSnapscrollScrollDelay",250).value("defaultSnapscrollSnapDuration",800).value("defaultSnapscrollResizeDelay",400).value("defaultSnapscrollBindScrollTimeout",400).value("defaultSnapscrollPreventDoubleSnapDelay",1e3)}(),function(){angular.module("snapscroll").directive("fitWindowHeight",["$window","$timeout","defaultSnapscrollResizeDelay",function(a,b,c){return{restrict:"A",require:"snapscroll",link:function(d,e,f,g){function h(){l===!1?g.setSnapHeight(a.innerHeight):(b.cancel(k),k=b(function(){g.setSnapHeight(a.innerHeight)},l))}function i(){"false"===l?l=!1:(l=parseInt(l,10),isNaN(l)&&(l=c)),g.setSnapHeight(a.innerHeight),j=angular.element(a),j.on("resize",h),d.$on("$destroy",function(){j.off("resize")})}var j,k,l=f.resizeDelay;i()}}}])}(),function(){function a(a){return angular.isNumber(a)&&!isNaN(a)}var b=angular.isDefined,c=angular.isUndefined,d=angular.isFunction,e=angular.forEach,f={enabled:"=snapscroll",snapIndex:"=?",snapHeight:"=?",beforeSnap:"&",afterSnap:"&",snapAnimation:"=?"},g=["$scope",function(a){this.setSnapHeight=function(b){a.snapHeight=b}}],h=["$timeout","$document","wheelie","scrollie","defaultSnapscrollScrollEasing","defaultSnapscrollScrollDelay","defaultSnapscrollSnapDuration","defaultSnapscrollBindScrollTimeout","defaultSnapscrollPreventDoubleSnapDelay",function(h,i,j,k,l,m,n,o,p){return{restrict:"A",scope:f,controller:g,link:function(f,g,q){function r(){return g.children()}function s(a){return a.offsetHeight}function t(a){return s(r()[a])}function u(){return s(g[0])}function v(){return g[0].scrollHeight}function w(a){var b=v()-u();return a>b?b:a}function x(a,c){for(var d=a[0],e=a[1],f=0,g=r(),h=0;h<d;h++)f+=s(g[h]);if(0===e)return w(f);var i,j=u(),k=s(g[d]);if(b(c)&&e<c[1]){i=k;for(var l=e;l>=0;l--)i-=j}else{i=0;for(var m=0;m<e;m++)i+=j;var n=i+j-k;n>0&&(i-=n)}return w(f+i)}function y(d,e){var g=d[0],h=c(e)||g!==e[0];if(h){var i=f.beforeSnap({snapIndex:g});if(i===!1)return void(b(e)&&(f.ignoreCompositeIndexChange=!0,f.compositeIndex=e));if(a(i))return void(f.snapIndex=i)}return A(x(d,e)).then(function(){h&&f.afterSnap({snapIndex:g})})}function z(){return g[0].scrollTop}function A(a){var b;b=f.snapAnimation?c(f.snapEasing)?[g,a,f.snapDuration]:[g,a,f.snapDuration,f.snapEasing]:[g,a];var d=z();return a>d?f.snapDirection="down":a<d?f.snapDirection="up":f.snapDirection="same",Z(),k.to.apply(k,b).then(function(){f.snapDirection=void 0,$(),B()})}function B(){function a(){f.preventUp=!1,f.preventDown=!1}(f.preventUp||f.preventDown)&&(f.preventDoubleSnapDelay===!1?a():h(a,f.preventDoubleSnapDelay))}function C(){var a=u();if(!a)return!1;var b=r();if(!b.length)return!1;var c=0;return e(b,function(a){c+=s(a)}),!(c<a)}function D(a){return a>=0&&a<=r().length-1}function E(b,d){if(C())return c(b)?void(f.snapIndex=0):a(b)?b%1!==0?void(f.snapIndex=Math.round(b)):f.ignoreSnapIndexChange===!0?void(f.ignoreSnapIndexChange=void 0):D(b)?void(f.compositeIndex=[b,0]):(D(d)||(d=0),f.ignoreSnapIndexChange=!0,void(f.snapIndex=d)):(a(d)||(d=0),void(f.snapIndex=d))}function F(){f.unwatchSnapIndex=f.$watch("snapIndex",E)}function G(){d(f.unwatchSnapIndex)&&(f.unwatchSnapIndex(),f.unwatchSnapIndex=void 0)}function H(a,b){if(!c(a)){var d=a[0];return f.snapIndex!==d&&(f.ignoreSnapIndexChange=!0,f.snapIndex=d),f.ignoreCompositeIndexChange===!0?void(f.ignoreCompositeIndexChange=void 0):void y(a,b)}}function I(){f.unwatchCompositeIndex=f.$watchCollection("compositeIndex",H)}function J(){d(f.unwatchCompositeIndex)&&(f.unwatchCompositeIndex(),f.unwatchCompositeIndex=void 0)}function K(a){var b=u(),c=t(a);if(c<=b)return 0;var d=parseInt(c/b,10);return c%b===0&&(d-=1),d}function L(a){var b=a[0],c=a[1];return c<0?D(b-1):!(c>K(b))||D(b+1)}function M(a){var b=a[0],c=a[1];return c<0?[b-1,K(b-1)]:c>K(b)?[b+1,0]:a}function N(a,b){if(C()){if("up"===a&&(f.preventDown=!1),"down"===a&&(f.preventUp=!1),f.snapDirection===a)return!0;if(f.preventUp||f.preventDown)return!0;var c,d=f.compositeIndex[0],e=f.compositeIndex[1];"up"===a&&(c=e-1),"down"===a&&(c=e+1);var g=[d,c];if(L(g))return"wheel"===b&&("up"===a&&(f.preventUp=!0),"down"===a&&(f.preventDown=!0)),f.$apply(function(){f.compositeIndex=M(g)}),!0}}function O(a){return N("up",a)}function P(a){return N("down",a)}function Q(){j.bind(g,{up:function(a){a.preventDefault(),O("wheel")&&a.stopPropagation()},down:function(a){a.preventDefault(),P("wheel")&&a.stopPropagation()}},f.ignoreWheelClass)}function R(){j.unbind(g)}function S(a,b){a.css("height",b+"px")}function T(d,h){if(!c(d)){if(!a(d))return void(a(h)&&(f.snapHeight=h));S(g,d),e(r(),function(a){S(angular.element(a),d)}),b(f.snapIndex)&&(c(f.compositeIndex)&&(f.compositeIndex=[f.snapIndex,0]),y(f.compositeIndex))}}function U(){f.unwatchSnapHeight=f.$watch("snapHeight",T)}function V(){d(f.unwatchSnapHeight)&&(f.unwatchSnapHeight(),f.unwatchSnapHeight=void 0)}function W(a){var b=0,c=0;if(a>0){b=-1;for(var d,e=r();a>0;)d=s(e[++b]),a-=d;var f=u();if(d>f){for(a+=d-f,a>=f&&c++;a>0;)c++,a-=f;f/2>=-a&&(c+=1)}else d/2>=-a&&(b+=1)}return M([b,c])}function X(){function a(){var a=W(z());f.compositeIndex[0]===a[0]&&f.compositeIndex[1]===a[1]?y(f.compositeIndex):f.$apply(function(){f.compositeIndex=a})}k.stop(g),f.scrollDelay===!1?a():(h.cancel(f.scrollPromise),f.scrollPromise=h(function(){a(),f.scrollPromise=void 0},f.scrollDelay))}function Y(){if(!f.preventSnappingAfterManualScroll&&!f.scrollBound){if(b(f.snapDirection))return void $();g.on("scroll",X),f.scrollBound=!0}}function Z(){f.scrollBound&&(g.off("scroll",X),f.scrollBound=!1)}function $(){f.preventSnappingAfterManualScroll||(f.bindScrollPromise&&h.cancel(f.bindScrollPromise),f.bindScrollPromise=h(function(){Y(),f.bindScrollPromise=void 0},o))}function _(a){a.originalEvent&&(a=a.originalEvent);var b,c=a.keyCode;38===c&&(b=O),40===c&&(b=P),b&&(a.preventDefault(),b())}function aa(){f.enableArrowKeys&&!f.arrowKeysBound&&(i.on("keydown",_),f.arrowKeysBound=!0)}function ba(){f.arrowKeysBound&&(i.off("keydown",_),f.arrowKeysBound=!1)}function ca(){var a=q.scrollDelay;"false"===a?f.scrollDelay=!1:(a=parseInt(a,10),isNaN(a)&&(a=m),f.scrollDelay=a);var e=q.preventDoubleSnapDelay;"false"===e?f.preventDoubleSnapDelay=!1:(e=parseInt(e,10),isNaN(e)&&(e=p),f.preventDoubleSnapDelay=e);var h=q.snapEasing;b(h)?f.snapEasing=f.$parent.$eval(h):d(l)&&(f.snapEasing=l);var i=parseInt(q.snapDuration,10);isNaN(i)&&(i=n),f.snapDuration=i,c(f.snapAnimation)&&(f.snapAnimation=!0),f.enableArrowKeys=b(q.enableArrowKeys),f.preventSnappingAfterManualScroll=b(q.preventSnappingAfterManualScroll),f.ignoreWheelClass=q.ignoreWheelClass,"scroll"!==g.css("overflowY")&&g.css("overflowY","auto"),f.$watch("enabled",function(a,b){function c(){f.preventSnappingAfterManualScroll||(f.compositeIndex=W(z()))}a!==!1?(b===!1&&c(),I(),F(),U(),Y(),Q(),aa()):(J(),G(),V(),Z(),R(),ba())}),f.$on("$destroy",function(){f.enabled!==!1&&(Z(),R(),ba())})}ca()}}}];angular.module("snapscroll").directive("snapscroll",h)}();

@@ -1,4 +0,27 @@

# angular-snapscroll docs
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
## snapscroll directive
- [angular-snapscroll](#angular-snapscroll)
- [snapscroll](#snapscroll)
- [snap-index](#snap-index)
- [snap-height](#snap-height)
- [fit-window-height](#fit-window-height)
- [enable-arrow-keys](#enable-arrow-keys)
- [ignore-wheel-class](#ignore-wheel-class)
- [before-snap](#before-snap)
- [after-snap](#after-snap)
- [snap-animation](#snap-animation)
- [snap-duration](#snap-duration)
- [snap-easing](#snap-easing)
- [prevent-snapping-after-manual-scroll](#prevent-snapping-after-manual-scroll)
- [scroll-delay](#scroll-delay)
- [resize-delay](#resize-delay)
- [prevent-double-snap-delay](#prevent-double-snap-delay)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# angular-snapscroll
## snapscroll
Adds scroll-and-snap behaviour to any element that has a vertical scrollbar:

@@ -30,3 +53,3 @@ ```html

##### snap-index
### snap-index
provides a two-way bind to the current index of the visible child element.

@@ -45,3 +68,3 @@ indeces are zero-based.

##### snap-height
### snap-height
allows you to provide the height of the element (and children elements) instead

@@ -58,3 +81,3 @@ of doing it in CSS. this is a two-way bind.

#### fit-window-height
### fit-window-height
instead of `snap-height`, you can use this attribute (it's actually a directive)

@@ -67,3 +90,3 @@ to make the snapHeight equal the window height. snapHeight will be updated

#### enable-arrow-keys
### enable-arrow-keys
enable support for snapping up and down when the up and down keyboard keys are

@@ -75,3 +98,17 @@ pressed, respectively.

#### before-snap
### ignore-wheel-class
snapscroll takes over the wheel events for the element it's bound to and
translates them to snapping up/down. to allow the normal scrolling on a nested
element (i.e. prevent snapping when the wheel event comes from that element),
add a class to the element and provide that class-name as the value for the
`ignore-wheel-class` attribute.
```html
<div snapscroll="" enable-arrow-keys="" ignore-wheel-class="ignore-me">
<div>
<div class="ignore-me">normal scrolling here</div>
</div>
</div>
```
### before-snap
is a callback executed before snapping occurs. the callback is passed a

@@ -100,3 +137,3 @@ `snapIndex` parameter, which is the index being snapped to. returning `false`

#### after-snap
### after-snap
is a callback executed after snapping occurs. the callback is passed a

@@ -118,3 +155,3 @@ `snapIndex` parameter, which is the index just snapped to. any return value from

#### snap-animation
### snap-animation
allows turning the snap animation on/off. this is a two-way bind.

@@ -142,3 +179,3 @@ ```javascript

#### snap-duration
### snap-duration
integer value indicating the length of the snap animation in milliseconds. a

@@ -156,3 +193,3 @@ value of 0 disables the snap-animation as well. default is 800ms.

#### snap-easing
### snap-easing
function reference that allows overriding the default easing of the snap

@@ -183,3 +220,3 @@ animation. note that this is not a regular angular callback but rather a

#### prevent-snapping-after-manual-scroll
### prevent-snapping-after-manual-scroll
snapscroll listens to the `scroll` event on the element that it's bound to and

@@ -189,3 +226,3 @@ automatically resets the current snap after a manual scroll so that it's always

#### scroll-delay
### scroll-delay
the `scroll` listener described above is throttled using a `scroll-delay`. this

@@ -204,3 +241,3 @@ delay can be changed by providing a value in milliseconds. it can also be turned

#### resize-delay
### resize-delay
the `resize` listener used by `fit-window-height` is throttled using a

@@ -219,3 +256,3 @@ `resize-delay`. this delay can be changed by providing a value in milliseconds.

#### prevent-double-snap-delay
### prevent-double-snap-delay
In order to prevent snapping twice in the same direction on trackpads with high

@@ -222,0 +259,0 @@ sensitivity, there is a 1 second delay that disables snapping to the same

{
"name": "angular-snapscroll",
"version": "1.0.2",
"version": "1.1.0",
"description": "Vertical scroll-and-snap functionality in angular",

@@ -40,3 +40,3 @@ "main": "dist/angular-snapscroll.js",

"angular-scrollie": "^1.0.0",
"angular-wheelie": "^2.0.0"
"angular-wheelie": "^2.1.0"
},

@@ -43,0 +43,0 @@ "repository": {

@@ -424,3 +424,3 @@ (function () {

}
});
}, scope.ignoreWheelClass);
}

@@ -666,2 +666,4 @@

scope.ignoreWheelClass = attributes.ignoreWheelClass;
if (element.css('overflowY') !== 'scroll') {

@@ -668,0 +670,0 @@ element.css('overflowY', 'auto');

Sorry, the diff of this file is too big to display

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