OHIF-198 - Jump to thumbnail when a new displaySet is added (#1834)

* Viewport letter only in multi-viewport layout.

* If SliceThickness not available print N/A

* Create displaySet in local session on SR generation.

* Jump to thumbnail when a new displaySet is added with the madeInClient property.

* Check if scrollIntoView exists.
This commit is contained in:
James Petts authored and GitHub committed 2020-06-30 17:27:35 +02:00
1 parent eb8f3a63f2
commit 2c11609c55
9 files changed
+113 -13

No files matched your search

@@ -52,7 +52,7 @@ export default class DisplaySetService {
displaySet => displaySet.displaySetInstanceUID === displaySetInstanceUid
);
makeDisplaySets = (input, batch = false) => {
makeDisplaySets = (input, { batch = false, madeInClient = false } = {}) => {
if (!input || !input.length) {
throw new Error('No instances were provided.');
}
@@ -78,11 +78,20 @@ export default class DisplaySetService {
displaySetsAdded = displaySets;
}
const options = {};
if (madeInClient) {
options.madeInClient = true;
}
// TODO: This is tricky. How do we know we're not resetting to the same/existing DSs?
// TODO: This is likely run anytime we touch DicomMetadataStore. How do we prevent uneccessary broadcasts?
if (displaySetsAdded && displaySetsAdded.length) {
this._broadcastEvent(EVENTS.DISPLAY_SETS_ADDED, displaySetsAdded);
this._broadcastEvent(EVENTS.DISPLAY_SETS_CHANGED, this.activeDisplaySets);
this._broadcastEvent(EVENTS.DISPLAY_SETS_ADDED, {
displaySetsAdded,
options,
});
}
};