mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-02-01 13:17:55 +02:00
Fix grid image merging
This commit is contained in:
parent
040e8f1ff2
commit
6de2aeed57
@ -181,6 +181,12 @@ export class GalleryGridComponent
|
|||||||
let lastRowId = 0;
|
let lastRowId = 0;
|
||||||
let diffFound = false;
|
let diffFound = false;
|
||||||
for (let i = 0; i < this.mediaGroups.length && i < this.mediaToRender.length; ++i) {
|
for (let i = 0; i < this.mediaGroups.length && i < this.mediaToRender.length; ++i) {
|
||||||
|
if (diffFound) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mediaToRender[i].name = this.mediaGroups[i].name; // update name if only this changed
|
||||||
|
|
||||||
for (let j = 0; j < this.mediaGroups[i].media.length && j < this.mediaToRender[i].media.length; ++j) {
|
for (let j = 0; j < this.mediaGroups[i].media.length && j < this.mediaToRender[i].media.length; ++j) {
|
||||||
const media = this.mediaGroups[i].media[j];
|
const media = this.mediaGroups[i].media[j];
|
||||||
const gridMedia = this.mediaToRender[i].media[j];
|
const gridMedia = this.mediaToRender[i].media[j];
|
||||||
@ -210,7 +216,7 @@ export class GalleryGridComponent
|
|||||||
}
|
}
|
||||||
// if all the same
|
// if all the same
|
||||||
if (diffFound) {
|
if (diffFound) {
|
||||||
if (lastSameIndex.media == 0 && lastSameIndex.groups == 0) {
|
if (lastSameIndex.media == 0 && lastSameIndex.groups <= 0) {
|
||||||
this.clearRenderedPhotos();
|
this.clearRenderedPhotos();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user