skrollr-rails 0.6.13 → 0.6.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/skrollr-rails/version.rb +1 -1
- data/vendor/assets/javascripts/skrollr.js +6 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3c41d26cb578a74c6406c0ac39ad512e4ceb579
|
4
|
+
data.tar.gz: 0ec5f20f4b4ee77a879d5a76cf39931b198da260
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c35869f0600a4dcdff752302721526c47b23b016dcf831408cd4b762e22089edaf7e56406387c26eb24233826dba27bf75c7df394b1d6fbf5a7e87a05a767d8
|
7
|
+
data.tar.gz: c65f1da2156b59aa77fa6f278fd0c595ff4c3e60481c6e766a2b66f5059edbe9b446f1d518914d98ff47326226629eaffccfd094adccc5bf889590da426ee0e3
|
@@ -19,7 +19,7 @@
|
|
19
19
|
init: function(options) {
|
20
20
|
return _instance || new Skrollr(options);
|
21
21
|
},
|
22
|
-
VERSION: '0.6.
|
22
|
+
VERSION: '0.6.14'
|
23
23
|
};
|
24
24
|
|
25
25
|
//Minify optimization.
|
@@ -581,11 +581,7 @@
|
|
581
581
|
};
|
582
582
|
|
583
583
|
Skrollr.prototype.setScrollTop = function(top, force) {
|
584
|
-
|
585
|
-
if(force === true) {
|
586
|
-
_lastTop = top;
|
587
|
-
_forceRender = true;
|
588
|
-
}
|
584
|
+
_forceRender = (force === true);
|
589
585
|
|
590
586
|
if(_isMobile) {
|
591
587
|
_mobileOffset = Math.min(Math.max(top, 0), _maxKeyFrame);
|
@@ -756,7 +752,7 @@
|
|
756
752
|
|
757
753
|
duration = duration * (1 - targetRatio);
|
758
754
|
|
759
|
-
_instance.animateTo(targetTop, {easing: 'outCubic', duration: duration});
|
755
|
+
_instance.animateTo((targetTop + 0.5) | 0, {easing: 'outCubic', duration: duration});
|
760
756
|
break;
|
761
757
|
}
|
762
758
|
});
|
@@ -982,8 +978,8 @@
|
|
982
978
|
|
983
979
|
_instance.setScrollTop(renderTop, true);
|
984
980
|
}
|
985
|
-
//Smooth scrolling only if there's no animation running and if we're not
|
986
|
-
else if(!
|
981
|
+
//Smooth scrolling only if there's no animation running and if we're not forcing the rendering.
|
982
|
+
else if(!_forceRender) {
|
987
983
|
var smoothScrollingDiff = _smoothScrolling.targetTop - renderTop;
|
988
984
|
|
989
985
|
//The user scrolled, start new smooth scrolling.
|
@@ -1015,7 +1011,7 @@
|
|
1015
1011
|
//Did the scroll position even change?
|
1016
1012
|
if(_forceRender || _lastTop !== renderTop) {
|
1017
1013
|
//Remember in which direction are we scrolling?
|
1018
|
-
_direction = (renderTop
|
1014
|
+
_direction = (renderTop > _lastTop) ? 'down' : (renderTop < _lastTop ? 'up' : _direction);
|
1019
1015
|
|
1020
1016
|
_forceRender = false;
|
1021
1017
|
|