fix(viewport): Fix active viewport by connecting to redux

This commit is contained in:
Erik Ziegler committed 2018-12-06 16:12:23 +01:00
1 parent 943efb44e5
commit 83a7271cd1
8 files changed
+78 -35

No files matched your search

@@ -18,7 +18,7 @@ const defaultButtons = [
type: 'tool',
text: 'Bidirectional',
svgUrl: '/icons.svg#icon-tools-measure-target',
active: true
active: false
},
{
command: 'StackScroll',
@@ -39,7 +39,7 @@ const defaultButtons = [
type: 'tool',
text: 'Manual',
svgUrl: '/icons.svg#icon-tools-levels',
active: false
active: true
},
{
command: 'setWLPresetSoftTissue',
@@ -1,12 +1,12 @@
const defaultState = {
activeViewport: 0
activeViewportIndex: 0
}
const viewports = (state = defaultState, action) => {
console.warn(action);
switch (action.type) {
case 'SET_VIEWPORT_ACTIVE':
return Object.assign({}, state, { activeViewport: action.viewportIndex });
return Object.assign({}, state, { activeViewportIndex: action.viewportIndex });
default:
return state;
}