Skip to content

Commit

Permalink
Fixed small caption bug after last release
Browse files Browse the repository at this point in the history
  • Loading branch information
ars committed Jan 26, 2022
1 parent 7aaf49b commit 5df31e1
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions dist/simple-lightbox.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ class SimpleLightbox {

if (this.controlCoordinates.targetScale > 1) {
this.controlCoordinates.zoomed = true;
if (!this.domNodes.caption.style.opacity && this.domNodes.caption.style.display !== 'none') {
if ( (!this.domNodes.caption.style.opacity || this.domNodes.caption.style.opacity > 0) && this.domNodes.caption.style.display !== 'none') {
this.fadeOut(this.domNodes.caption, this.options.fadeSpeed);
}
} else {
Expand Down Expand Up @@ -818,7 +818,7 @@ class SimpleLightbox {
this.zoomPanElement(0 + "px", 0 + "px", this.controlCoordinates.initialScale);


if (!this.domNodes.caption.style.opacity && this.domNodes.caption.style.display !== 'none') {
if ( (!this.domNodes.caption.style.opacity || this.domNodes.caption.style.opacity > 0) && this.domNodes.caption.style.display !== 'none') {
this.fadeOut(this.domNodes.caption, this.options.fadeSpeed);
}

Expand Down Expand Up @@ -903,7 +903,7 @@ class SimpleLightbox {

if (this.controlCoordinates.targetScale > 1) {
this.controlCoordinates.zoomed = true;
if (!this.domNodes.caption.style.opacity && this.domNodes.caption.style.display !== 'none') {
if ((!this.domNodes.caption.style.opacity || this.domNodes.caption.style.opacity > 0) && this.domNodes.caption.style.display !== 'none') {
this.fadeOut(this.domNodes.caption, this.options.fadeSpeed);
}
}
Expand Down Expand Up @@ -1049,7 +1049,7 @@ class SimpleLightbox {
this.controlCoordinates.initialScale = this.options.doubleTapZoom;
this.setZoomData(this.controlCoordinates.initialScale, 0, 0);
this.zoomPanElement(0 + "px", 0 + "px", this.controlCoordinates.initialScale);
if (!this.domNodes.caption.style.opacity && this.domNodes.caption.style.display !== 'none') {
if ((!this.domNodes.caption.style.opacity || this.domNodes.caption.style.opacity > 0) && this.domNodes.caption.style.display !== 'none') {
this.fadeOut(this.domNodes.caption, this.options.fadeSpeed);
}
this.controlCoordinates.zoomed = true;
Expand Down
8 changes: 4 additions & 4 deletions dist/simple-lightbox.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ var SimpleLightbox = /*#__PURE__*/function () {
if (_this6.controlCoordinates.targetScale > 1) {
_this6.controlCoordinates.zoomed = true;

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}
} else {
Expand Down Expand Up @@ -898,7 +898,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

_this6.zoomPanElement(0 + "px", 0 + "px", _this6.controlCoordinates.initialScale);

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}

Expand Down Expand Up @@ -991,7 +991,7 @@ var SimpleLightbox = /*#__PURE__*/function () {
if (_this6.controlCoordinates.targetScale > 1) {
_this6.controlCoordinates.zoomed = true;

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}
}
Expand Down Expand Up @@ -1143,7 +1143,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

_this6.zoomPanElement(0 + "px", 0 + "px", _this6.controlCoordinates.initialScale);

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}

Expand Down
2 changes: 1 addition & 1 deletion dist/simple-lightbox.jquery.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/simple-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ var SimpleLightbox = /*#__PURE__*/function () {
if (_this6.controlCoordinates.targetScale > 1) {
_this6.controlCoordinates.zoomed = true;

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}
} else {
Expand Down Expand Up @@ -885,7 +885,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

_this6.zoomPanElement(0 + "px", 0 + "px", _this6.controlCoordinates.initialScale);

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}

Expand Down Expand Up @@ -978,7 +978,7 @@ var SimpleLightbox = /*#__PURE__*/function () {
if (_this6.controlCoordinates.targetScale > 1) {
_this6.controlCoordinates.zoomed = true;

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}
}
Expand Down Expand Up @@ -1130,7 +1130,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

_this6.zoomPanElement(0 + "px", 0 + "px", _this6.controlCoordinates.initialScale);

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}

Expand Down
8 changes: 4 additions & 4 deletions dist/simple-lightbox.legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5566,7 +5566,7 @@ var SimpleLightbox = /*#__PURE__*/function () {
if (_this6.controlCoordinates.targetScale > 1) {
_this6.controlCoordinates.zoomed = true;

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}
} else {
Expand Down Expand Up @@ -5640,7 +5640,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

_this6.zoomPanElement(0 + "px", 0 + "px", _this6.controlCoordinates.initialScale);

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}

Expand Down Expand Up @@ -5733,7 +5733,7 @@ var SimpleLightbox = /*#__PURE__*/function () {
if (_this6.controlCoordinates.targetScale > 1) {
_this6.controlCoordinates.zoomed = true;

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}
}
Expand Down Expand Up @@ -5885,7 +5885,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

_this6.zoomPanElement(0 + "px", 0 + "px", _this6.controlCoordinates.initialScale);

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}

Expand Down
2 changes: 1 addition & 1 deletion dist/simple-lightbox.legacy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/simple-lightbox.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/simple-lightbox.modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ var SimpleLightbox = /*#__PURE__*/function () {
if (_this6.controlCoordinates.targetScale > 1) {
_this6.controlCoordinates.zoomed = true;

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}
} else {
Expand Down Expand Up @@ -883,7 +883,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

_this6.zoomPanElement(0 + "px", 0 + "px", _this6.controlCoordinates.initialScale);

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}

Expand Down Expand Up @@ -976,7 +976,7 @@ var SimpleLightbox = /*#__PURE__*/function () {
if (_this6.controlCoordinates.targetScale > 1) {
_this6.controlCoordinates.zoomed = true;

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}
}
Expand Down Expand Up @@ -1128,7 +1128,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

_this6.zoomPanElement(0 + "px", 0 + "px", _this6.controlCoordinates.initialScale);

if (!_this6.domNodes.caption.style.opacity && _this6.domNodes.caption.style.display !== 'none') {
if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {
_this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);
}

Expand Down
8 changes: 4 additions & 4 deletions src/simple-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ class SimpleLightbox {

if (this.controlCoordinates.targetScale > 1) {
this.controlCoordinates.zoomed = true;
if (!this.domNodes.caption.style.opacity && this.domNodes.caption.style.display !== 'none') {
if ( (!this.domNodes.caption.style.opacity || this.domNodes.caption.style.opacity > 0) && this.domNodes.caption.style.display !== 'none') {
this.fadeOut(this.domNodes.caption, this.options.fadeSpeed);
}
} else {
Expand Down Expand Up @@ -812,7 +812,7 @@ class SimpleLightbox {
this.zoomPanElement(0 + "px", 0 + "px", this.controlCoordinates.initialScale);


if (!this.domNodes.caption.style.opacity && this.domNodes.caption.style.display !== 'none') {
if ( (!this.domNodes.caption.style.opacity || this.domNodes.caption.style.opacity > 0) && this.domNodes.caption.style.display !== 'none') {
this.fadeOut(this.domNodes.caption, this.options.fadeSpeed);
}

Expand Down Expand Up @@ -897,7 +897,7 @@ class SimpleLightbox {

if (this.controlCoordinates.targetScale > 1) {
this.controlCoordinates.zoomed = true;
if (!this.domNodes.caption.style.opacity && this.domNodes.caption.style.display !== 'none') {
if ((!this.domNodes.caption.style.opacity || this.domNodes.caption.style.opacity > 0) && this.domNodes.caption.style.display !== 'none') {
this.fadeOut(this.domNodes.caption, this.options.fadeSpeed);
}
}
Expand Down Expand Up @@ -1043,7 +1043,7 @@ class SimpleLightbox {
this.controlCoordinates.initialScale = this.options.doubleTapZoom;
this.setZoomData(this.controlCoordinates.initialScale, 0, 0);
this.zoomPanElement(0 + "px", 0 + "px", this.controlCoordinates.initialScale);
if (!this.domNodes.caption.style.opacity && this.domNodes.caption.style.display !== 'none') {
if ((!this.domNodes.caption.style.opacity || this.domNodes.caption.style.opacity > 0) && this.domNodes.caption.style.display !== 'none') {
this.fadeOut(this.domNodes.caption, this.options.fadeSpeed);
}
this.controlCoordinates.zoomed = true;
Expand Down

0 comments on commit 5df31e1

Please sign in to comment.