fix(viewport): Fix active viewport by connecting to redux
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user