sick_js 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70cfeed3eb9d49cf6e71e2bff9386df31a9f91ba
|
4
|
+
data.tar.gz: 34863fe3efbb34fb53b8bd0ba58641ac12b0021e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c970cc187659ffcce51cfee117fb2cbe064ea34bef58474f079471e3c3a44bb0ae837342a6ef07016aa812b09a9e2afa7c96cab4a8be298eef4d9a6d069a83d
|
7
|
+
data.tar.gz: 404f91a852910d14122cbcdbdea044462683d109879a89c5d4c04b4a0c996cee423d4d7dbac33805ea1bfbcaf05818a0e7ef1b07332e5021dd59003bac374245
|
@@ -4,6 +4,7 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
(function($){
|
7
|
+
if(!$) return;
|
7
8
|
$.fn.horizontalScroll = function (amount) {
|
8
9
|
amount = amount || 120;
|
9
10
|
|
@@ -14,13 +15,13 @@
|
|
14
15
|
.bind("mouseout", function(){
|
15
16
|
$(this).data("user_is_interacting", false);
|
16
17
|
})
|
17
|
-
.bind("DOMMouseScroll mousewheel", function (event) {
|
18
|
+
.bind("DOMMouseScroll mousewheel", function (event, delta) {
|
18
19
|
var oEvent = event.originalEvent,
|
19
|
-
deltaX = Math.abs(oEvent.wheelDeltaX),
|
20
|
-
deltaY = Math.abs(oEvent.wheelDeltaY);
|
20
|
+
deltaX = Math.abs(oEvent.wheelDeltaX || oEvent.deltaX),
|
21
|
+
deltaY = Math.abs(oEvent.wheelDeltaY || oEvent.deltaY);
|
21
22
|
|
22
23
|
if( $(this).data("user_is_interacting") && deltaX < deltaY ){
|
23
|
-
var direction = oEvent.detail ? oEvent.detail * -amount : oEvent.wheelDelta,
|
24
|
+
var direction = oEvent.detail ? oEvent.detail * -amount : (oEvent.wheelDelta || (event.deltaFactor * delta)),
|
24
25
|
position = $(this).scrollLeft();
|
25
26
|
position += direction > 0 ? -amount : amount;
|
26
27
|
|
data/lib/sick_js/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sick_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Greene
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|