scrivito_section_widgets 0.0.18 → 0.0.19

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: 4f3556de3c06d11e61196238f2e7e156702d7c79
4
- data.tar.gz: 95c492f668b7092f07a1f51addd9591f9c8e4aaa
3
+ metadata.gz: e18d3d96563d57df4b2b0d532fa1ea5bc6e14819
4
+ data.tar.gz: cb6c0e87dff45de91deb5adcb40dff6efbc9dca8
5
5
  SHA512:
6
- metadata.gz: f62862dd4ffed46a83c813a0fe9e4c4178be010c0f52c8a53ab73965680aec594b440115c9569e6f0e6f5d3bc8ea74922720c2757e9b2f94f5a5b22550d3011e
7
- data.tar.gz: 8f53de1070b57fa3da8e93744d378ee30111d08e62372f37aa31dacbf8829436c75612ca814b89fa44762668b8927064e40ac102bd059a04911b1d2b505df60b
6
+ metadata.gz: 32c2488b2b4483f43caf1ff40e0e50aeb7920b3fdd29f0e3d40cbc9f37ad21c27b0cfef3a076136f2797a3f0635d705138cc2e99d5738a926c4d64975f0d94f7
7
+ data.tar.gz: b33cbbe72f934699e8f13e0a89cdac900b616ab12b4296da56ffb7fdeb1e11244704ac7e26222a88f153a72795223d060f60e246f56f2775a135b8ded4ebd9dc
@@ -15,10 +15,34 @@ $(function(){
15
15
  $(window).on('scroll', function(event) {
16
16
  window.requestAnimationFrame(function(){ set_background_positions(images); });
17
17
  });
18
+ } else {
19
+ set_dimension(images);
20
+
21
+ $(window).on('resize', function(event) {
22
+ set_dimension(images);
23
+ });
18
24
  }
25
+
19
26
  });
20
27
  });
21
28
 
29
+ function set_dimension(images) {
30
+ var height = 0;
31
+ var container = null;
32
+
33
+ $.each(images, function(i, image) {
34
+ container = $(image).parents('.parallax');
35
+ height = $(image).get(0).clientHeight / 1.3;
36
+
37
+ if(height > 0) {
38
+ container.css({
39
+ 'height': height,
40
+ });
41
+ }
42
+ });
43
+ }
44
+
45
+
22
46
  function set_background_positions(images) {
23
47
  $.each(images, function(i, image) {
24
48
  set_background_position(image);
@@ -1,3 +1,3 @@
1
1
  module ScrivitoSectionWidgets
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_section_widgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-29 00:00:00.000000000 Z
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler