Skip to content

Commit

Permalink
Merge pull request #1729 from girder/overlay-guard
Browse files Browse the repository at this point in the history
Guard against switching on and off overlay layers quickly
  • Loading branch information
manthey authored Nov 22, 2024
2 parents d5f0c24 + a9bbb01 commit c186297
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

- Fix an issue searching for annotation metadata on items that a user doesn't have permissions to view ([#1723](../../pull/1723))
- Fix a typo in a column header ([#1727](../../pull/1727))
- Guard against switching on and off overlay layers quickly ([#1729](../../pull/1729))

## 1.30.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def generateResult():
# could be used in its most default mode instead like so:
# result = json.dumps(element, separators=(',', ':'))
# Collect multiple elements before emitting them. This
# balances using less memoryand streaming right away with
# balances using less memory and streaming right away with
# efficiency in dumping the json. Experimentally, 100 is
# significantly faster than 10 and not much slower than 1000.
collect.append(element)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,13 @@ var GeojsImageViewerWidgetExtension = function (viewer) {
restRequest({
url: `item/${overlayItemId}/tiles`
}).done((response) => {
// Since overlay layers are created asynchronously, we need to ensure that an attempt
// to draw the same overlays happening at roughly the same time does not create
// extra layers
// Since overlay layers are created asynchronously, we need
// to ensure that an attempt to draw the same overlays
// happening at roughly the same time does not create extra
// layers
if (!this.viewer) {
return;
}
const conflictingLayers = this.viewer.layers().filter(
(layer) => layer.id() === overlay.id);
if (conflictingLayers.length > 0) {
Expand Down

0 comments on commit c186297

Please sign in to comment.