skrollr-rails 0.6.23 → 0.6.24

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: 7d129c8969be774ce9a3c6daded5a213e6b32107
4
- data.tar.gz: 574fc526d377b22f74f677297d7d3445108b83f4
3
+ metadata.gz: 44b8915aa2d15d10dda44b4b7726fab9dbfda00a
4
+ data.tar.gz: 0a7d142563e00026dfc0629e6f185d0164208336
5
5
  SHA512:
6
- metadata.gz: dab9b26c46dda850da2444febc03dda3d1aef4affc5228602bb97d55ed00daa0d7ead9e1952cb49d0702288daff8e6a664f14f46bc5ed3c239fa220be31b4d50
7
- data.tar.gz: 5f1a1c1d4e4fcc10b97a0a653f44cae0651be14fb37dbcb570bb7ce796ea64159f03d6bda3198855fdebdf07f1626a47a2e2308bf287203220a1b7925a71e9a0
6
+ metadata.gz: fdc62b7607039831c9f92f342b7a80803b1165a4e2021a4c139b8bf8852c492b720a7025c90b1113670d8d8b3cba0ac262760558208d5494bc3ef1e74bfd3c81
7
+ data.tar.gz: ca76dbd7a6ad6c7d8041716c9133c15d945473e6314587bdd262fe50fbf6f8dcf29ada1e2d962f1717accb083cec2fa64990eadcf0c0454f986e7b7bf9837710
@@ -1,5 +1,5 @@
1
1
  module Skrollr
2
2
  module Rails
3
- VERSION = "0.6.23"
3
+ VERSION = "0.6.24"
4
4
  end
5
5
  end
@@ -67,7 +67,7 @@
67
67
  //Find all data-attributes. data-[_constant]-[offset]-[anchor]-[anchor].
68
68
  var rxKeyframeAttribute = /^data(?:-(_\w+))?(?:-?(-?\d*\.?\d+p?))?(?:-?(start|end|top|center|bottom))?(?:-?(top|center|bottom))?$/;
69
69
 
70
- var rxPropValue = /\s*([\w\-\[\]]+)\s*:\s*(.+?)\s*(?:;|$)/gi;
70
+ var rxPropValue = /\s*(@?[\w\-\[\]]+)\s*:\s*(.+?)\s*(?:;|$)/gi;
71
71
 
72
72
  //Easing function names follow the property in square brackets.
73
73
  var rxPropEasing = /^([a-z\-]+)\[(\w+)\]$/;
@@ -357,7 +357,7 @@
357
357
  var emitEvents = false;
358
358
 
359
359
  //If we're reseting the counter, remove any old element ids that may be hanging around.
360
- if(ignoreID) {
360
+ if(ignoreID && SKROLLABLE_ID_DOM_PROPERTY in el) {
361
361
  delete el[SKROLLABLE_ID_DOM_PROPERTY];
362
362
  }
363
363
 
@@ -658,8 +658,8 @@
658
658
  _reset(_skrollables[skrollableIndex].element);
659
659
  }
660
660
 
661
- documentElement.style.overflow = body.style.overflow = 'auto';
662
- documentElement.style.height = body.style.height = 'auto';
661
+ documentElement.style.overflow = body.style.overflow = '';
662
+ documentElement.style.height = body.style.height = '';
663
663
 
664
664
  if(_skrollrBody) {
665
665
  skrollr.setStyle(_skrollrBody, 'transform', 'none');
@@ -984,7 +984,12 @@
984
984
  if(hasProp.call(props, key)) {
985
985
  value = _interpolateString(props[key].value);
986
986
 
987
- skrollr.setStyle(element, key, value);
987
+ //Set style or attribute.
988
+ if(key.indexOf('@') === 0) {
989
+ element.setAttribute(key.substr(1), value);
990
+ } else {
991
+ skrollr.setStyle(element, key, value);
992
+ }
988
993
  }
989
994
  }
990
995
 
@@ -1018,7 +1023,12 @@
1018
1023
 
1019
1024
  value = _interpolateString(value);
1020
1025
 
1021
- skrollr.setStyle(element, key, value);
1026
+ //Set style or attribute.
1027
+ if(key.indexOf('@') === 0) {
1028
+ element.setAttribute(key.substr(1), value);
1029
+ } else {
1030
+ skrollr.setStyle(element, key, value);
1031
+ }
1022
1032
  }
1023
1033
  }
1024
1034
 
@@ -1505,7 +1515,7 @@
1505
1515
 
1506
1516
  if(_forceHeight && !_isMobile) {
1507
1517
  //un-"force" the height to not mess with the calculations in _updateDependentKeyFrames (#216).
1508
- body.style.height = 'auto';
1518
+ body.style.height = '';
1509
1519
  }
1510
1520
 
1511
1521
  _updateDependentKeyFrames();
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.23
4
+ version: 0.6.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Reed