Still broken, but app runs

This commit is contained in:
Erik Ziegler committed 2020-05-19 10:59:50 +02:00
1 parent aec30e0db1
commit b65a91129e
5 files changed
+149 -112

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);
@@ -99,12 +96,12 @@ export default class DisplaySetService {
}
// If array of array of instances
this._broadcastChange(EVENTS.DISPLAY_SETS_ADDED, displaySetsAdded);
if (displaySetsAdded && displaySetsAdded.length) {
this._broadcastChange(EVENTS.DISPLAY_SETS_ADDED, displaySetsAdded);
}
};
makeDisplaySetForInstances(instances) {
debugger;
const instance = instances[0];
const existingDisplaySets =
@@ -61,7 +61,6 @@ const MeasurementTable = ({ data, title, amount, onClick, onEdit }) => {
right: 4,
transform: isActive ? '' : 'translateX(100%)',
}}
e
onClick={(e) => {
// stopPropagation needed to avoid disable the current active item
e.stopPropagation();
@@ -20,7 +20,7 @@ function ViewerViewportGrid(props) {
// TODO -> Make a HangingProtocolService
const HangingProtocolService = displaySets => {
const displaySetInstanceUID = displaySets[Object.keys(displaySets)[0]][0].displaySetInstanceUID;
const displaySetInstanceUID = displaySets[0].displaySetInstanceUID;
return {
numRows: 1,
@@ -40,7 +40,7 @@ function ViewerViewportGrid(props) {
useEffect(() => {
const { unsubscribe } = DisplaySetService.subscribe(
DisplaySetService.EVENTS.DISPLAY_SET_ADDED,
DisplaySetService.EVENTS.DISPLAY_SETS_ADDED,
handleDisplaySetSubscription
);