Skip to content

Commit

Permalink
Fixed captions bug #162
Browse files Browse the repository at this point in the history
  • Loading branch information
Arinas committed Feb 18, 2020
1 parent db5c224 commit 667061b
Show file tree
Hide file tree
Showing 13 changed files with 641 additions and 573 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ Run `gulp watch` to enable continous watching of both src/simple-lightbox.js and
Just call `gulp build` to have all files and variants created inside dist!

### Changelog
**2.1.1 - Fixed captions bug #162**
**2.1.0 - Added rel grouping feature #16 and added rtl support #161**
**2.0.0 - Complete rewrite. Now uses modern ES6 javascript, without the need of jQuery. Can use jQuery anyway. Developers can use gulp with babel to contribute. Thanks to Mtillmann #129 for the implementation**
**1.17.3 - Fixed new chrome passive error #155**
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplelightbox",
"version": "2.1.0",
"version": "2.1.1",
"homepage": "https://simplelightbox.com/",
"authors": [
"André Rinas <[email protected]> (https://www.andrerinas.de)"
Expand Down
3 changes: 2 additions & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="header-container">
<div class="container demo-container">
<div class="info">
<h1>SimpleLightbox <sup>v2.1.0</sup></h1>
<h1>SimpleLightbox <sup>v2.1.1</sup></h1>
<span class="subline">Touch-friendly image lightbox</span>
<nav>
<a class="btn donate" target="_blank" href="https://www.paypal.me/anrinas">Donate</a>
Expand Down Expand Up @@ -584,6 +584,7 @@ <h2>Customization</h2>
<h2>Changelog</h2>
</div>
<div class="col-right">
<strong>2.1.1</strong> - Fixed captions bug #162<br />
<strong>2.1.0</strong> - Added rel grouping feature #16<br />
<strong>2.0.0</strong> - Complete rewrite. Now uses modern ES6 javascript, without the need of jQuery. Can use jQuery anyway. Developers can use gulp with babel to contribute. Thanks to Mtillmann #129 for the implementation <br />
<strong>1.17.3</strong> - Fixed new chrome passive error #155<br />
Expand Down
2 changes: 1 addition & 1 deletion dist/simple-lightbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.1.0
Version 2.1.1
*/
body.hidden-scroll {
overflow: hidden; }
Expand Down
16 changes: 9 additions & 7 deletions dist/simple-lightbox.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.1.0
Version 2.1.1
*/
"use strict";

Expand Down Expand Up @@ -544,12 +544,14 @@ function () {
var captionContainer = _this5.options.captionSelector === 'self' ? _this5.relatedElements[_this5.currentImageIndex] : _this5.relatedElements[_this5.currentImageIndex].querySelector(_this5.options.captionSelector),
captionText;

if (_this5.options.captionType === 'data') {
captionText = captionContainer.dataset[_this5.options.captionsData];
} else if (_this5.options.captionType === 'text') {
captionText = captionContainer.innerHTML;
} else {
captionText = captionContainer.getAttribute(_this5.options.captionsData);
if (_this5.options.captions && captionContainer) {
if (_this5.options.captionType === 'data') {
captionText = captionContainer.dataset[_this5.options.captionsData];
} else if (_this5.options.captionType === 'text') {
captionText = captionContainer.innerHTML;
} else {
captionText = captionContainer.getAttribute(_this5.options.captionsData);
}
}

if (!_this5.options.loop) {
Expand Down
4 changes: 2 additions & 2 deletions dist/simple-lightbox.jquery.min.js

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions dist/simple-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.1.0
Version 2.1.1
*/
"use strict";

Expand Down Expand Up @@ -544,12 +544,14 @@ function () {
var captionContainer = _this5.options.captionSelector === 'self' ? _this5.relatedElements[_this5.currentImageIndex] : _this5.relatedElements[_this5.currentImageIndex].querySelector(_this5.options.captionSelector),
captionText;

if (_this5.options.captionType === 'data') {
captionText = captionContainer.dataset[_this5.options.captionsData];
} else if (_this5.options.captionType === 'text') {
captionText = captionContainer.innerHTML;
} else {
captionText = captionContainer.getAttribute(_this5.options.captionsData);
if (_this5.options.captions && captionContainer) {
if (_this5.options.captionType === 'data') {
captionText = captionContainer.dataset[_this5.options.captionsData];
} else if (_this5.options.captionType === 'text') {
captionText = captionContainer.innerHTML;
} else {
captionText = captionContainer.getAttribute(_this5.options.captionsData);
}
}

if (!_this5.options.loop) {
Expand Down
2 changes: 1 addition & 1 deletion dist/simple-lightbox.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/simple-lightbox.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 667061b

Please sign in to comment.