Skip to content

Commit

Permalink
Merge pull request #1654 from girder/large-image-check
Browse files Browse the repository at this point in the history
Update item lists check for large images when toggling recurse
  • Loading branch information
manthey authored Sep 27, 2024
2 parents 47c7c58 + 3e8dfbe commit f051161
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Add users option to config files; have a default config file ([#1649](../../pull/1649))
- Remove no longer used code; adjust item list slightly ([#1651](../../pull/1651))
- Reduce updates when showing item lists; add a waiting spinner ([#1653](../../pull/1653))
- Update item lists check for large images when toggling recurse ([#1654](../../pull/1654))

### Bug Fixes

Expand Down
4 changes: 4 additions & 0 deletions girder/girder_large_image/web_client/views/itemList.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ wrap(ItemListWidget, 'render', function (render) {
const oldPages = this._totalPages;
const pages = Math.ceil(this.collection.getTotalCount() / this.collection.pageLimit);
this._totalPages = pages;
// recheck if this has large images
this._hasAnyLargeImage = !!_.some(this.collection.toArray(), function (item) {
return item.has('largeImage');
});
this._inFetch = false;
itemListRender.apply(this, _.rest(arguments));
if (oldPages !== pages || this.collection.offset !== this.collection.size()) {
Expand Down

0 comments on commit f051161

Please sign in to comment.