empty viewport, prevent duplicate series meta from add, protect broadcast events when no data has changed
This commit is contained in:
1 parent
692f4c1ca5
commit
c9a4ab13ef
13 files changed
+198
-146
No files matched your search
@@ -6,6 +6,7 @@ const displaySetCache = [];
|
||||
export default class DisplaySetService {
|
||||
constructor() {
|
||||
this.displaySets = {};
|
||||
this.activeDisplaySets = [];
|
||||
this.listeners = {};
|
||||
this.EVENTS = EVENTS;
|
||||
|
||||
@@ -77,9 +78,10 @@ export default class DisplaySetService {
|
||||
displaySetsAdded = displaySets;
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user