lory-rails 0.1.4 → 0.2.0
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 +4 -4
- data/VERSIONS.md +1 -0
- data/lib/lory/rails/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.lory.js +11 -3
- data/vendor/assets/javascripts/lory.js +11 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03e490ca9f7a3fefaa91d4459eba6791ec9c364a
|
4
|
+
data.tar.gz: 20ed2657a319b4607ecf6740aa79a34c3163f383
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24408fa4543dd7538f72405c0138868079d6ea5d9b2eacac5320b51bfd97532dc0db49cd561dd7350d12d57684ce6b7fe50e48b20d9448863f623128f9da73d0
|
7
|
+
data.tar.gz: 6cdb6880244b613ae122eafd9c1fcea80a80af48963d085034fa2b1c2a4bdc3134d01e1865f1adc6d88c36b05cefd6ed2da85e587bf028833b5e4cc51c4311f2
|
data/VERSIONS.md
CHANGED
data/lib/lory/rails/version.rb
CHANGED
@@ -283,9 +283,17 @@ function lory(slider, opts) {
|
|
283
283
|
|
284
284
|
if (typeof nextIndex !== 'number') {
|
285
285
|
if (direction) {
|
286
|
-
|
286
|
+
if (infinite && index + infinite * 2 !== slides.length) {
|
287
|
+
nextIndex = index + (infinite - index % infinite);
|
288
|
+
} else {
|
289
|
+
nextIndex = index + slidesToScroll;
|
290
|
+
}
|
287
291
|
} else {
|
288
|
-
|
292
|
+
if (infinite && index % infinite !== 0) {
|
293
|
+
nextIndex = index - index % infinite;
|
294
|
+
} else {
|
295
|
+
nextIndex = index - slidesToScroll;
|
296
|
+
}
|
289
297
|
}
|
290
298
|
}
|
291
299
|
|
@@ -321,7 +329,7 @@ function lory(slider, opts) {
|
|
321
329
|
index = nextIndex;
|
322
330
|
}
|
323
331
|
|
324
|
-
if (infinite && (nextIndex === slides.length - infinite || nextIndex === 0)) {
|
332
|
+
if (infinite && (nextIndex === slides.length - infinite || nextIndex === slides.length - slides.length % infinite || nextIndex === 0)) {
|
325
333
|
if (direction) {
|
326
334
|
index = infinite;
|
327
335
|
}
|
@@ -283,9 +283,17 @@ function lory(slider, opts) {
|
|
283
283
|
|
284
284
|
if (typeof nextIndex !== 'number') {
|
285
285
|
if (direction) {
|
286
|
-
|
286
|
+
if (infinite && index + infinite * 2 !== slides.length) {
|
287
|
+
nextIndex = index + (infinite - index % infinite);
|
288
|
+
} else {
|
289
|
+
nextIndex = index + slidesToScroll;
|
290
|
+
}
|
287
291
|
} else {
|
288
|
-
|
292
|
+
if (infinite && index % infinite !== 0) {
|
293
|
+
nextIndex = index - index % infinite;
|
294
|
+
} else {
|
295
|
+
nextIndex = index - slidesToScroll;
|
296
|
+
}
|
289
297
|
}
|
290
298
|
}
|
291
299
|
|
@@ -321,7 +329,7 @@ function lory(slider, opts) {
|
|
321
329
|
index = nextIndex;
|
322
330
|
}
|
323
331
|
|
324
|
-
if (infinite && (nextIndex === slides.length - infinite || nextIndex === 0)) {
|
332
|
+
if (infinite && (nextIndex === slides.length - infinite || nextIndex === slides.length - slides.length % infinite || nextIndex === 0)) {
|
325
333
|
if (direction) {
|
326
334
|
index = infinite;
|
327
335
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lory-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tanvir hasan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04
|
11
|
+
date: 2018-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|