slick_rails 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/slick.js +49 -21
- data/lib/slick_rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7cd6762da48390106529cebfdd2e3197843dcff
|
4
|
+
data.tar.gz: 693b4df7d294637bb3ccab2cdcf855f24ceaf431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04679ecf8ad214febb51f13d7578315a0acdbbcdfed019cac2c5ae706170fb8ed652037f5cd07b9b9a37feae5072e39f12b8bbb90df89bd51dd7a0afc28c8f3a
|
7
|
+
data.tar.gz: 62563180a0bccb416ef531785769668724e714273d22c4358367a142ffe7c504343eb4cac26af2423a152fd29d940d45f0bf069d9fb2aadb30cd6d4707e91dfa
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|___/_|_|\___|_|\_(_)/ |___/
|
7
7
|
|__/
|
8
8
|
|
9
|
-
Version: 1.5.
|
9
|
+
Version: 1.5.9
|
10
10
|
Author: Ken Wheeler
|
11
11
|
Website: http://kenwheeler.github.io
|
12
12
|
Docs: http://kenwheeler.github.io/slick
|
@@ -81,6 +81,7 @@
|
|
81
81
|
touchMove: true,
|
82
82
|
touchThreshold: 5,
|
83
83
|
useCSS: true,
|
84
|
+
useTransform: false,
|
84
85
|
variableWidth: false,
|
85
86
|
vertical: false,
|
86
87
|
verticalSwiping: false,
|
@@ -500,8 +501,6 @@
|
|
500
501
|
.data('originalStyling', $(element).attr('style') || '');
|
501
502
|
});
|
502
503
|
|
503
|
-
_.$slidesCache = _.$slides;
|
504
|
-
|
505
504
|
_.$slider.addClass('slick-slider');
|
506
505
|
|
507
506
|
_.$slideTrack = (_.slideCount === 0) ?
|
@@ -967,6 +966,8 @@
|
|
967
966
|
|
968
967
|
if (filter !== null) {
|
969
968
|
|
969
|
+
_.$slidesCache = _.$slides;
|
970
|
+
|
970
971
|
_.unload();
|
971
972
|
|
972
973
|
_.$slideTrack.children(this.options.slide).detach();
|
@@ -997,7 +998,7 @@
|
|
997
998
|
if (_.options.infinite === true) {
|
998
999
|
while (breakPoint < _.slideCount) {
|
999
1000
|
++pagerQty;
|
1000
|
-
breakPoint = counter + _.options.
|
1001
|
+
breakPoint = counter + _.options.slidesToScroll;
|
1001
1002
|
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
1002
1003
|
}
|
1003
1004
|
} else if (_.options.centerMode === true) {
|
@@ -1005,7 +1006,7 @@
|
|
1005
1006
|
} else {
|
1006
1007
|
while (breakPoint < _.slideCount) {
|
1007
1008
|
++pagerQty;
|
1008
|
-
breakPoint = counter + _.options.
|
1009
|
+
breakPoint = counter + _.options.slidesToScroll;
|
1009
1010
|
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
1010
1011
|
}
|
1011
1012
|
}
|
@@ -1074,15 +1075,33 @@
|
|
1074
1075
|
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
|
1075
1076
|
}
|
1076
1077
|
|
1077
|
-
|
1078
|
+
if (_.options.rtl === true) {
|
1079
|
+
if (targetSlide[0]) {
|
1080
|
+
targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
|
1081
|
+
} else {
|
1082
|
+
targetLeft = 0;
|
1083
|
+
}
|
1084
|
+
} else {
|
1085
|
+
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
|
1086
|
+
}
|
1078
1087
|
|
1079
1088
|
if (_.options.centerMode === true) {
|
1080
|
-
if (_.options.infinite === false) {
|
1089
|
+
if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
|
1081
1090
|
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
|
1082
1091
|
} else {
|
1083
1092
|
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
|
1084
1093
|
}
|
1085
|
-
|
1094
|
+
|
1095
|
+
if (_.options.rtl === true) {
|
1096
|
+
if (targetSlide[0]) {
|
1097
|
+
targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
|
1098
|
+
} else {
|
1099
|
+
targetLeft = 0;
|
1100
|
+
}
|
1101
|
+
} else {
|
1102
|
+
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
|
1103
|
+
}
|
1104
|
+
|
1086
1105
|
targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
|
1087
1106
|
}
|
1088
1107
|
}
|
@@ -1494,6 +1513,7 @@
|
|
1494
1513
|
|
1495
1514
|
if (imgCount > 0) {
|
1496
1515
|
targetImage = $('img[data-lazy]', _.$slider).first();
|
1516
|
+
targetImage.attr('src', null);
|
1497
1517
|
targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function() {
|
1498
1518
|
targetImage.removeAttr('data-lazy');
|
1499
1519
|
_.progressiveLazyLoad();
|
@@ -1512,8 +1532,22 @@
|
|
1512
1532
|
|
1513
1533
|
Slick.prototype.refresh = function( initializing ) {
|
1514
1534
|
|
1515
|
-
var _ = this,
|
1516
|
-
|
1535
|
+
var _ = this, currentSlide, firstVisible;
|
1536
|
+
|
1537
|
+
firstVisible = _.slideCount - _.options.slidesToShow;
|
1538
|
+
|
1539
|
+
// check that the new breakpoint can actually accept the
|
1540
|
+
// "current slide" as the current slide, otherwise we need
|
1541
|
+
// to set it to the closest possible value.
|
1542
|
+
if ( !_.options.infinite ) {
|
1543
|
+
if ( _.slideCount <= _.options.slidesToShow ) {
|
1544
|
+
_.currentSlide = 0;
|
1545
|
+
} else if ( _.currentSlide > firstVisible ) {
|
1546
|
+
_.currentSlide = firstVisible;
|
1547
|
+
}
|
1548
|
+
}
|
1549
|
+
|
1550
|
+
currentSlide = _.currentSlide;
|
1517
1551
|
|
1518
1552
|
_.destroy(true);
|
1519
1553
|
|
@@ -1892,8 +1926,7 @@
|
|
1892
1926
|
_.transformType = 'transform';
|
1893
1927
|
_.transitionType = 'transition';
|
1894
1928
|
}
|
1895
|
-
_.transformsEnabled = (_.animType !== null && _.animType !== false);
|
1896
|
-
|
1929
|
+
_.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
|
1897
1930
|
};
|
1898
1931
|
|
1899
1932
|
|
@@ -2588,19 +2621,14 @@
|
|
2588
2621
|
};
|
2589
2622
|
|
2590
2623
|
Slick.prototype.activateADA = function() {
|
2591
|
-
var _ = this
|
2592
|
-
_isSlideOnFocus =_.$slider.find('*').is(':focus');
|
2593
|
-
// _isSlideOnFocus = _.$slides.is(':focus') || _.$slides.find('*').is(':focus');
|
2624
|
+
var _ = this;
|
2594
2625
|
|
2595
2626
|
_.$slideTrack.find('.slick-active').attr({
|
2596
|
-
'aria-hidden': 'false'
|
2597
|
-
'tabindex': '0'
|
2627
|
+
'aria-hidden': 'false'
|
2598
2628
|
}).find('a, input, button, select').attr({
|
2599
2629
|
'tabindex': '0'
|
2600
2630
|
});
|
2601
2631
|
|
2602
|
-
(_isSlideOnFocus) && _.$slideTrack.find('.slick-active').focus();
|
2603
|
-
|
2604
2632
|
};
|
2605
2633
|
|
2606
2634
|
Slick.prototype.focusHandler = function() {
|
@@ -2627,9 +2655,9 @@
|
|
2627
2655
|
opt = arguments[0],
|
2628
2656
|
args = Array.prototype.slice.call(arguments, 1),
|
2629
2657
|
l = _.length,
|
2630
|
-
i
|
2658
|
+
i,
|
2631
2659
|
ret;
|
2632
|
-
for (i; i < l; i++) {
|
2660
|
+
for (i = 0; i < l; i++) {
|
2633
2661
|
if (typeof opt == 'object' || typeof opt == 'undefined')
|
2634
2662
|
_[i].slick = new Slick(_[i], opt);
|
2635
2663
|
else
|
data/lib/slick_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slick_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guy Israeli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.4.
|
98
|
+
rubygems_version: 2.4.5.1
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: Slick Carousel - The Last Carousel you will ever need. Now for Rails
|