Skip to content

Commit

Permalink
version setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ericnewton76 committed Apr 9, 2022
1 parent 645d8e1 commit 1b669c7
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 24 deletions.
8 changes: 4 additions & 4 deletions dist/css/justifiedGallery.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* justifiedGallery - v3.8.1
* http://miromannino.github.io/Justified-Gallery/
* Copyright (c) 2020 Miro Mannino
/*
* Justified Gallery - v3.9.0-645d8e1
* http://miromannino.com/projects/justified-gallery/
* Copyright (c) 2019 Miro Mannino
* Licensed under the MIT license.
*/
.justified-gallery {
Expand Down
8 changes: 4 additions & 4 deletions dist/css/justifiedGallery.min.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* justifiedGallery - v3.8.1
* http://miromannino.github.io/Justified-Gallery/
* Copyright (c) 2020 Miro Mannino
/*
* Justified Gallery - v3.9.0-645d8e1
* http://miromannino.com/projects/justified-gallery/
* Copyright (c) 2019 Miro Mannino
* Licensed under the MIT license.
*/
.justified-gallery {
Expand Down
25 changes: 15 additions & 10 deletions dist/js/jquery.justifiedGallery.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* justifiedGallery - v3.8.1
* justifiedGallery - v3.9.0-645d8e1
* http://miromannino.github.io/Justified-Gallery/
* Copyright (c) 2020 Miro Mannino
* Copyright (c) 2022 Miro Mannino
* Licensed under the MIT license.
*/
(function (factory) {
Expand Down Expand Up @@ -127,16 +127,20 @@
* @returns {String} the suffix to use
*/
JustifiedGallery.prototype.newSrc = function (imageSrc, imgWidth, imgHeight, image) {
var newImageSrc;
var newImageSrc = null;

if (this.settings.thumbnailPath) {
newImageSrc = this.settings.thumbnailPath(imageSrc, imgWidth, imgHeight, image);
} else {
}

if (newImageSrc == null) {

var matchRes = imageSrc.match(this.settings.extension);
var ext = (matchRes !== null) ? matchRes[0] : '';
newImageSrc = imageSrc.replace(this.settings.extension, '');
newImageSrc = this.removeSuffix(newImageSrc, this.getUsedSuffix(newImageSrc));
newImageSrc += this.getSuffix(imgWidth, imgHeight) + ext;

}

return newImageSrc;
Expand Down Expand Up @@ -217,11 +221,12 @@
var imageSrc = $image.data('jg.src');
if (imageSrc) {
imageSrc = this.newSrc(imageSrc, imgWidth, imgHeight, $image[0]);


var self = this;
$image.one('error', function () {
this.resetImgSrc($image); //revert to the original thumbnail
self.resetImgSrc($image); //revert to the original thumbnail
});

var loadNewImage = function () {
// if (imageSrc !== newImageSrc) {
$image.attr('src', imageSrc);
Expand Down Expand Up @@ -658,7 +663,7 @@
this.insertToGallery(a);
return a;
};

/**
* Sort the array using settings.comparator as comparator
*
Expand All @@ -670,7 +675,7 @@
this.insertToGallery(a);
return a;
};

/**
* Reset the filters removing the 'jg-filtered' class from all the entries
*
Expand Down
6 changes: 3 additions & 3 deletions dist/js/jquery.justifiedGallery.min.js

Large diffs are not rendered by default.

Binary file modified dist/justifiedGallery.min.zip
Binary file not shown.
Binary file modified dist/justifiedGallery.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions src/js/justifiedGallery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Justified Gallery - v3.8.1
* Justified Gallery - v3.9.0-645d8e1
* http://miromannino.github.io/Justified-Gallery/
*
* Copyright (c) 2019 Miro Mannino
Expand Down Expand Up @@ -106,7 +106,7 @@ JustifiedGallery.prototype.newSrc = function (imageSrc, imgWidth, imgHeight, ima
if (this.settings.thumbnailPath) {
newImageSrc = this.settings.thumbnailPath(imageSrc, imgWidth, imgHeight, image);
}

if (newImageSrc == null) {

var matchRes = imageSrc.match(this.settings.extension);
Expand Down
2 changes: 1 addition & 1 deletion src/less/justifiedGallery.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Justified Gallery - 3.8.1
* Justified Gallery - v3.9.0-645d8e1
* http://miromannino.com/projects/justified-gallery/
* Copyright (c) 2019 Miro Mannino
* Licensed under the MIT license.
Expand Down

0 comments on commit 1b669c7

Please sign in to comment.