fix: Initial sort not consistent (#5224)

* fix: Initial sort not consistent

* Add better sort criteria

* Remove sorting changes

* Start replacing screen shots

* Update bun lock for version

* Leave default sort for test mode

* fix: Add consistent sorting for same series splits

* PR comments

* docs: add notes for series/display set sort

* Updated example docs

* Update sortVector to be compareSameStudy

* Add unit test

* PR comments
This commit is contained in:
Bill Wallace authored and GitHub committed 2025-12-04 12:26:21 -05:00
1 parent 14bc99124d
commit 77f9f8e1c4
8 files changed
+253 -66

No files matched your search

@@ -464,12 +464,17 @@ export default class DisplaySetService extends PubSubService {
/**
*
* @param sortFn function to sort the display sets
* @param direction direction to sort the display sets
* @param direction direction to sort the display sets. Ascending means
* increasing in value, which will typically put the lowest series numbers
* first, with low priority display sets last with newest first.
* The meaning of this flag may change to leave the image/non-image display
* set sorting alone and only affect sorting within groups, or have additional
* values for specific changes to the sort.
* @returns void
*/
public sortDisplaySets(
sortFn: (a: DisplaySet, b: DisplaySet) => number,
direction: string,
direction: 'ascending' | 'descending' = 'ascending',
suppressEvent = false
): void {
this.activeDisplaySets.sort(sortFn);