Pull in upstream.

This commit is contained in:
James A. Petts committed 2020-05-19 11:04:42 +02:00
commit 156b9cfd09
5 files changed
+148 -111

No files matched your search

@@ -1,7 +1,7 @@
import pubSubServiceInterface from '../pubSubServiceInterface';
const EVENTS = {
DISPLAY_SETS_ADDED: 'event::displaySetService:displaySetAdded',
DISPLAY_SETS_ADDED: 'event::displaySetService:displaySetsAdded',
};
const displaySetCache = [];
@@ -81,11 +81,8 @@ export default class DisplaySetService {
}
// If array of instances => One instance.
let displaySetsAdded = [];
debugger;
if (batch) {
input.forEach(instances => {
const displaySets = this.makeDisplaySetForInstances(instances);
@@ -98,13 +95,13 @@ export default class DisplaySetService {
displaySetsAdded = displaySets;
}
if (displaySetsAdded.length) {
// If array of array of instances
if (displaySetsAdded && displaySetsAdded.length) {
this._broadcastChange(EVENTS.DISPLAY_SETS_ADDED, displaySetsAdded);
}
};
makeDisplaySetForInstances(instances) {
debugger;
const instance = instances[0];
const existingDisplaySets =