Skip to content

Commit

Permalink
Properly reorder annotations after modifying them
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Oct 19, 2023
1 parent 35a5421 commit 647195f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/common/annotation-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,8 @@ class AnnotationManager {
}
else {
this._annotations.push(annotation);
this._annotations.sort((a, b) => (a.sortIndex > b.sortIndex) - (a.sortIndex < b.sortIndex));
}

this._annotations.sort((a, b) => (a.sortIndex > b.sortIndex) - (a.sortIndex < b.sortIndex));
this._unsavedAnnotations = this._unsavedAnnotations.filter(x => x.id !== annotation.id);

if (instant) {
Expand Down

0 comments on commit 647195f

Please sign in to comment.