owlcarousel2-rails 2.1.0 → 2.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8920bcbfd85728df66137f27d701ae02a0a6cdaf
4
- data.tar.gz: e2337b72cd072a00fb88e0cfb9adc9b10b23e845
3
+ metadata.gz: d29158bfff3dc00a89473cc62fee8654f332c870
4
+ data.tar.gz: 344fe119e30b29f2c77d98b8c91c1084a23440c5
5
5
  SHA512:
6
- metadata.gz: 55b69ca995f0015070e1db2c435c461be9f04bf8952c031047f0fc167d809070c791071a407c5bd0bba42c171f8e112c1f076b4c04bac61df64f1a8e9f516b80
7
- data.tar.gz: 060ce7e4d234fc05792a4cf41fe75257884f737a73e3f76f307000010b218a155544c92245610ce96f4e2ffbe1bd76ed5eef70f1f99a1afb830c551fe960d4ab
6
+ metadata.gz: 1e3145080c233fa0e07828e6b62dc0a5ba752d6b37e9d6cbd5c3e81fb4b6678291f31100bf8edde8d935eb3b5287df88008157e940139617d300a78af41ee62e
7
+ data.tar.gz: 0920563b3aad1206e1200e0869540b4390c9c1f531c4b77fae26c02a6988e3ef5039eb8c87124ef72b009d9adefd6d29646f4e3bc5032c95b16c5238cf47b409
@@ -1,5 +1,5 @@
1
1
  module OwlCarousel2
2
2
  module Rails
3
- VERSION = "2.1.0"
3
+ VERSION = "2.2.1"
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{OwlCarousel2 packaged for the rails assets pipeline.}
13
13
  spec.description = %q{Touch enabled jQuery plugin that lets you create a beautiful responsive carousel slider.}
14
- spec.homepage = "https://github.com/ilja/owlcarousel2-rails."
14
+ spec.homepage = "https://github.com/ilja/owlcarousel2-rails"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -1,11 +1,11 @@
1
1
  /**
2
- * Owl Carousel v2.1.0
3
- * Copyright 2013-2016 David Deutsch
4
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
2
+ * Owl Carousel v2.2.1
3
+ * Copyright 2013-2017 David Deutsch
4
+ * Licensed under ()
5
5
  */
6
6
  /**
7
7
  * Owl carousel
8
- * @version 2.1.0
8
+ * @version 2.1.6
9
9
  * @author Bartosz Wojciechowski
10
10
  * @author David Deutsch
11
11
  * @license The MIT License (MIT)
@@ -326,6 +326,7 @@
326
326
  var clones = [],
327
327
  items = this._items,
328
328
  settings = this.settings,
329
+ // TODO: Should be computed from number of min width items in stage
329
330
  view = Math.max(settings.items * 2, 4),
330
331
  size = Math.ceil(items.length / 2) * 2,
331
332
  repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0,
@@ -335,6 +336,7 @@
335
336
  repeat /= 2;
336
337
 
337
338
  while (repeat--) {
339
+ // Switch to only using appended clones
338
340
  clones.push(this.normalize(clones.length / 2, true));
339
341
  append = append + items[clones[clones.length - 1]][0].outerHTML;
340
342
  clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
@@ -515,6 +517,9 @@
515
517
  });
516
518
 
517
519
  settings = $.extend({}, this.options, overwrites[match]);
520
+ if (typeof settings.stagePadding === 'function') {
521
+ settings.stagePadding = settings.stagePadding();
522
+ }
518
523
  delete settings.responsive;
519
524
 
520
525
  // responsive class
@@ -525,13 +530,11 @@
525
530
  }
526
531
  }
527
532
 
528
- if (this.settings === null || this._breakpoint !== match) {
529
- this.trigger('change', { property: { name: 'settings', value: settings } });
530
- this._breakpoint = match;
531
- this.settings = settings;
532
- this.invalidate('settings');
533
- this.trigger('changed', { property: { name: 'settings', value: this.settings } });
534
- }
533
+ this.trigger('change', { property: { name: 'settings', value: settings } });
534
+ this._breakpoint = match;
535
+ this.settings = settings;
536
+ this.invalidate('settings');
537
+ this.trigger('changed', { property: { name: 'settings', value: this.settings } });
535
538
  };
536
539
 
537
540
  /**
@@ -1022,17 +1025,23 @@
1022
1025
  Owl.prototype.maximum = function(relative) {
1023
1026
  var settings = this.settings,
1024
1027
  maximum = this._coordinates.length,
1025
- boundary = Math.abs(this._coordinates[maximum - 1]) - this._width,
1026
- i = -1, j;
1028
+ iterator,
1029
+ reciprocalItemsWidth,
1030
+ elementWidth;
1027
1031
 
1028
1032
  if (settings.loop) {
1029
1033
  maximum = this._clones.length / 2 + this._items.length - 1;
1030
1034
  } else if (settings.autoWidth || settings.merge) {
1031
- // binary search
1032
- while (maximum - i > 1) {
1033
- Math.abs(this._coordinates[j = maximum + i >> 1]) < boundary
1034
- ? i = j : maximum = j;
1035
+ iterator = this._items.length;
1036
+ reciprocalItemsWidth = this._items[--iterator].width();
1037
+ elementWidth = this.$element.width();
1038
+ while (iterator--) {
1039
+ reciprocalItemsWidth += this._items[iterator].width() + this.settings.margin;
1040
+ if (reciprocalItemsWidth > elementWidth) {
1041
+ break;
1042
+ }
1035
1043
  }
1044
+ maximum = iterator + 1;
1036
1045
  } else if (settings.center) {
1037
1046
  maximum = this._items.length - 1;
1038
1047
  } else {
@@ -1267,7 +1276,7 @@
1267
1276
  } else if (document.documentElement && document.documentElement.clientWidth) {
1268
1277
  width = document.documentElement.clientWidth;
1269
1278
  } else {
1270
- throw 'Can not detect viewport width.';
1279
+ console.warn('Can not detect viewport width.');
1271
1280
  }
1272
1281
  return width;
1273
1282
  };
@@ -1295,7 +1304,7 @@
1295
1304
  item = this.prepare(item);
1296
1305
  this.$stage.append(item);
1297
1306
  this._items.push(item);
1298
- this._mergers.push(item.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
1307
+ this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
1299
1308
  }, this));
1300
1309
 
1301
1310
  this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);
@@ -1324,11 +1333,11 @@
1324
1333
  this._items.length === 0 && this.$stage.append(content);
1325
1334
  this._items.length !== 0 && this._items[position - 1].after(content);
1326
1335
  this._items.push(content);
1327
- this._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
1336
+ this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
1328
1337
  } else {
1329
1338
  this._items[position].before(content);
1330
1339
  this._items.splice(position, 0, content);
1331
- this._mergers.splice(position, 0, content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
1340
+ this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
1332
1341
  }
1333
1342
 
1334
1343
  this._items[current] && this.reset(this._items[current].index());
@@ -1904,7 +1913,7 @@
1904
1913
  image = new Image();
1905
1914
  image.onload = $.proxy(function() {
1906
1915
  $element.css({
1907
- 'background-image': 'url(' + url + ')',
1916
+ 'background-image': 'url("' + url + '")',
1908
1917
  'opacity': '1'
1909
1918
  });
1910
1919
  this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
@@ -2163,7 +2172,7 @@
2163
2172
  https://vimeo.com/groups/:group/videos/:id
2164
2173
  https://app.vzaar.com/videos/:id
2165
2174
 
2166
- Visual example: http://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F
2175
+ Visual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F
2167
2176
  */
2168
2177
 
2169
2178
  id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
@@ -2304,7 +2313,7 @@
2304
2313
 
2305
2314
  if (video.type === 'youtube') {
2306
2315
  html = '<iframe width="' + width + '" height="' + height + '" src="//www.youtube.com/embed/' +
2307
- video.id + '?autoplay=1&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>';
2316
+ video.id + '?autoplay=1&rel=0&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>';
2308
2317
  } else if (video.type === 'vimeo') {
2309
2318
  html = '<iframe src="//player.vimeo.com/video/' + video.id +
2310
2319
  '?autoplay=1" width="' + width + '" height="' + height +
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Owl Carousel v2.1.0
3
- * Copyright 2013-2016 David Deutsch
4
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
2
+ * Owl Carousel v2.2.1
3
+ * Copyright 2013-2017 David Deutsch
4
+ * Licensed under ()
5
5
  */
6
6
  /*
7
7
  * Owl Carousel - Core
@@ -15,7 +15,9 @@
15
15
  z-index: 1; }
16
16
  .owl-carousel .owl-stage {
17
17
  position: relative;
18
- -ms-touch-action: pan-Y; }
18
+ -ms-touch-action: pan-Y;
19
+ -moz-backface-visibility: hidden;
20
+ /* fix firefox animation glitch */ }
19
21
  .owl-carousel .owl-stage:after {
20
22
  content: ".";
21
23
  display: block;
@@ -28,6 +30,14 @@
28
30
  overflow: hidden;
29
31
  /* fix for flashing background */
30
32
  -webkit-transform: translate3d(0px, 0px, 0px); }
33
+ .owl-carousel .owl-wrapper,
34
+ .owl-carousel .owl-item {
35
+ -webkit-backface-visibility: hidden;
36
+ -moz-backface-visibility: hidden;
37
+ -ms-backface-visibility: hidden;
38
+ -webkit-transform: translate3d(0, 0, 0);
39
+ -moz-transform: translate3d(0, 0, 0);
40
+ -ms-transform: translate3d(0, 0, 0); }
31
41
  .owl-carousel .owl-item {
32
42
  position: relative;
33
43
  min-height: 1px;
@@ -37,8 +47,7 @@
37
47
  -webkit-touch-callout: none; }
38
48
  .owl-carousel .owl-item img {
39
49
  display: block;
40
- width: 100%;
41
- -webkit-transform-style: preserve-3d; }
50
+ width: 100%; }
42
51
  .owl-carousel .owl-nav.disabled,
43
52
  .owl-carousel .owl-dots.disabled {
44
53
  display: none; }
@@ -60,7 +69,7 @@
60
69
  .owl-carousel.owl-hidden {
61
70
  opacity: 0; }
62
71
  .owl-carousel.owl-refresh .owl-item {
63
- display: none; }
72
+ visibility: hidden; }
64
73
  .owl-carousel.owl-drag .owl-item {
65
74
  -webkit-user-select: none;
66
75
  -moz-user-select: none;
@@ -82,10 +91,8 @@
82
91
  * Owl Carousel - Animate Plugin
83
92
  */
84
93
  .owl-carousel .animated {
85
- -webkit-animation-duration: 1000ms;
86
- animation-duration: 1000ms;
87
- -webkit-animation-fill-mode: both;
88
- animation-fill-mode: both; }
94
+ animation-duration: 1000ms;
95
+ animation-fill-mode: both; }
89
96
 
90
97
  .owl-carousel .owl-animated-in {
91
98
  z-index: 0; }
@@ -94,14 +101,7 @@
94
101
  z-index: 1; }
95
102
 
96
103
  .owl-carousel .fadeOut {
97
- -webkit-animation-name: fadeOut;
98
- animation-name: fadeOut; }
99
-
100
- @-webkit-keyframes fadeOut {
101
- 0% {
102
- opacity: 1; }
103
- 100% {
104
- opacity: 0; } }
104
+ animation-name: fadeOut; }
105
105
 
106
106
  @keyframes fadeOut {
107
107
  0% {
@@ -123,8 +123,7 @@
123
123
  transition: opacity 400ms ease; }
124
124
 
125
125
  .owl-carousel .owl-item img.owl-lazy {
126
- -webkit-transform-style: preserve-3d;
127
- transform-style: preserve-3d; }
126
+ transform-style: preserve-3d; }
128
127
 
129
128
  /*
130
129
  * Owl Carousel - Video Plugin
@@ -146,13 +145,11 @@
146
145
  cursor: pointer;
147
146
  z-index: 1;
148
147
  -webkit-backface-visibility: hidden;
149
- transition: -webkit-transform 100ms ease;
150
148
  transition: transform 100ms ease; }
151
149
 
152
150
  .owl-carousel .owl-video-play-icon:hover {
153
- -webkit-transform: scale(1.3, 1.3);
154
- -ms-transform: scale(1.3, 1.3);
155
- transform: scale(1.3, 1.3); }
151
+ -ms-transform: scale(1.3, 1.3);
152
+ transform: scale(1.3, 1.3); }
156
153
 
157
154
  .owl-carousel .owl-video-playing .owl-video-tn,
158
155
  .owl-carousel .owl-video-playing .owl-video-play-icon {
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: owlcarousel2-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilja Krijger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-10 00:00:00.000000000 Z
11
+ date: 2017-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.8'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  description: Touch enabled jQuery plugin that lets you create a beautiful responsive
@@ -46,7 +46,7 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - ".gitignore"
49
+ - .gitignore
50
50
  - Gemfile
51
51
  - LICENSE
52
52
  - README.md
@@ -56,7 +56,7 @@ files:
56
56
  - owlcarousel2-rails.gemspec
57
57
  - vendor/assets/javascripts/owl.carousel2.js
58
58
  - vendor/assets/stylesheets/owl.carousel2.css
59
- homepage: https://github.com/ilja/owlcarousel2-rails.
59
+ homepage: https://github.com/ilja/owlcarousel2-rails
60
60
  licenses:
61
61
  - MIT
62
62
  metadata: {}
@@ -66,19 +66,18 @@ require_paths:
66
66
  - lib
67
67
  required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ">="
69
+ - - '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">="
74
+ - - '>='
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.2.2
79
+ rubygems_version: 2.0.14.1
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: OwlCarousel2 packaged for the rails assets pipeline.
83
83
  test_files: []
84
- has_rdoc: