Skip to content

Commit

Permalink
Reject the promise from a canceled annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed May 23, 2024
1 parent 5512696 commit eb46e2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Improvements
- Better detect available memory in containers ([#1532](../../pull/1532))
- Reject the promise from a canceled annotation ([#1535](../../pull/1535))

### Changes
- Log more when saving annotations ([#1525](../../pull/1525))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -892,12 +892,13 @@ var GeojsImageViewerWidgetExtension = function (viewer) {
}
);
layer.mode(type, undefined, options.modeOptions);
if (options.signalModeChange) {
layer.geoOn(window.geo.event.annotation.mode, (evt) => {
layer.geoOff(window.geo.event.annotation.mode);
layer.geoOn(window.geo.event.annotation.mode, (evt) => {
layer.geoOff(window.geo.event.annotation.mode);
if (options.signalModeChange) {
events.trigger('li:drawModeChange', {event: evt});
});
}
}
defer.reject();
});
return defer.promise();
},

Expand Down

0 comments on commit eb46e2b

Please sign in to comment.