skrollr-rails 0.6.14 → 0.6.15

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: b3c41d26cb578a74c6406c0ac39ad512e4ceb579
4
- data.tar.gz: 0ec5f20f4b4ee77a879d5a76cf39931b198da260
3
+ metadata.gz: 2506acbc1d652c7ccd09d60e02553493e2871d7d
4
+ data.tar.gz: 755b5e86c6efbb0b30e6366cd2711ef3de0b2270
5
5
  SHA512:
6
- metadata.gz: 9c35869f0600a4dcdff752302721526c47b23b016dcf831408cd4b762e22089edaf7e56406387c26eb24233826dba27bf75c7df394b1d6fbf5a7e87a05a767d8
7
- data.tar.gz: c65f1da2156b59aa77fa6f278fd0c595ff4c3e60481c6e766a2b66f5059edbe9b446f1d518914d98ff47326226629eaffccfd094adccc5bf889590da426ee0e3
6
+ metadata.gz: 8fa5312f5dbcc521b2c880fdee4fa724227e3033a0d19fa2e6a4e5cada8e3e8137c4e509868ca81bc5fa9f8397ff8a0777203e04c03890e538a5d93563f0ff19
7
+ data.tar.gz: 036128af38adae715c27478f9dbc63d09402215eff22d393c450c8ce68338c0713aa15d0cc7f082bdf7a988e90b267b3d2ade34097821cb52713f1b176e0d1b3
@@ -1,5 +1,5 @@
1
1
  module Skrollr
2
2
  module Rails
3
- VERSION = "0.6.14"
3
+ VERSION = "0.6.15"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@
19
19
  init: function(options) {
20
20
  return _instance || new Skrollr(options);
21
21
  },
22
- VERSION: '0.6.14'
22
+ VERSION: '0.6.15'
23
23
  };
24
24
 
25
25
  //Minify optimization.
@@ -600,6 +600,10 @@
600
600
  }
601
601
  };
602
602
 
603
+ Skrollr.prototype.getMaxScrollTop = function() {
604
+ return _maxKeyFrame;
605
+ };
606
+
603
607
  Skrollr.prototype.on = function(name, fn) {
604
608
  _listeners[name] = fn;
605
609
 
@@ -695,6 +699,12 @@
695
699
  _instance.stopAnimateTo();
696
700
 
697
701
  initialElement = e.target;
702
+
703
+ //We don't want text nodes.
704
+ while(initialElement.nodeType === 3) {
705
+ initialElement = initialElement.parentNode;
706
+ }
707
+
698
708
  initialTouchY = lastTouchY = currentTouchY;
699
709
  initialTouchX = currentTouchX;
700
710
  initialTouchTime = currentTouchTime;
@@ -718,9 +728,12 @@
718
728
 
719
729
  //Check if it was more like a tap (moved less than 7px).
720
730
  if(distance2 < 49) {
721
- //It was a tap, click the element.
722
731
  initialElement.focus();
723
- initialElement.click();
732
+
733
+ //It was a tap, click the element.
734
+ var clickEvent = document.createEvent('MouseEvent');
735
+ clickEvent.initEvent('click', true, true);
736
+ initialElement.dispatchEvent(clickEvent);
724
737
 
725
738
  return;
726
739
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skrollr-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.14
4
+ version: 0.6.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Reed