diff --git a/docs/latest/assets/img/open-graph.png b/docs/latest/assets/img/open-graph.png new file mode 100644 index 000000000..5b881abdf Binary files /dev/null and b/docs/latest/assets/img/open-graph.png differ diff --git a/extensions/ohif-vtk-extension/src/ConnectedToolbarSection.js b/extensions/ohif-vtk-extension/src/ConnectedToolbarSection.js index 37adbf11d..19f2e18f0 100644 --- a/extensions/ohif-vtk-extension/src/ConnectedToolbarSection.js +++ b/extensions/ohif-vtk-extension/src/ConnectedToolbarSection.js @@ -3,7 +3,7 @@ import { ToolbarSection } from 'react-viewerbase'; import OHIF from 'ohif-core'; const { setToolActive } = OHIF.redux.actions; -const Icons = `${window.config.routerBasename}/icons.svg`; +const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/'); const mapStateToProps = state => { const activeButton = state.tools.buttons.find(tool => tool.active === true); diff --git a/img/designs/open-graph.fig b/img/designs/open-graph.fig new file mode 100644 index 000000000..7b13a4b90 Binary files /dev/null and b/img/designs/open-graph.fig differ diff --git a/src/components/Labelling/LabellingFlow.js b/src/components/Labelling/LabellingFlow.js index 0f6185d7c..de294d83a 100644 --- a/src/components/Labelling/LabellingFlow.js +++ b/src/components/Labelling/LabellingFlow.js @@ -93,6 +93,8 @@ export default class LabellingFlow extends Component { locationLabel, } = this.state + const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/') + if (!skipAddLabelButton) { return ( <> @@ -124,7 +126,7 @@ export default class LabellingFlow extends Component { onClick={this.fadeOutAndLeaveFast} > - +
diff --git a/src/components/OHIFLogo/OHIFLogo.js b/src/components/OHIFLogo/OHIFLogo.js index abbb524f8..08d60eadd 100644 --- a/src/components/OHIFLogo/OHIFLogo.js +++ b/src/components/OHIFLogo/OHIFLogo.js @@ -1,7 +1,7 @@ import React from 'react' import './OHIFLogo.css' -const Icons = `${window.config.routerBasename}/icons.svg` +const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/') function OHIFLogo() { return ( diff --git a/src/connectedComponents/ConnectedPluginSwitch.js b/src/connectedComponents/ConnectedPluginSwitch.js index f22fb2787..1b22767a4 100644 --- a/src/connectedComponents/ConnectedPluginSwitch.js +++ b/src/connectedComponents/ConnectedPluginSwitch.js @@ -36,7 +36,7 @@ const mergeProps = (propsFromState, propsFromDispatch, ownProps) => { // TODO: Do not display certain options if the current display set // cannot be displayed using these view types - const Icons = `${window.config.routerBasename}/icons.svg` + const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/') const buttons = [ { text: 'Acquired', diff --git a/src/connectedComponents/ToolbarRow.js b/src/connectedComponents/ToolbarRow.js index e7f57d65e..d0a504146 100644 --- a/src/connectedComponents/ToolbarRow.js +++ b/src/connectedComponents/ToolbarRow.js @@ -6,7 +6,7 @@ import ConnectedLayoutButton from './ConnectedLayoutButton' import ConnectedPluginSwitch from './ConnectedPluginSwitch.js' import './ToolbarRow.css' -const Icons = `${window.config.routerBasename}/icons.svg` +const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/') class ToolbarRow extends Component { static propTypes = { diff --git a/src/setupButtons.js b/src/setupButtons.js deleted file mode 100644 index 418f8db37..000000000 --- a/src/setupButtons.js +++ /dev/null @@ -1,89 +0,0 @@ -import OHIF from 'ohif-core' - -const Icons = 'icons.svg' - -export default function setupButtons(store) { - const defaultButtons = [ - { - command: 'StackScroll', - type: 'tool', - text: 'Stack Scroll', - svgUrl: `${Icons}#icon-tools-stack-scroll`, - active: false, - }, - { - command: 'Zoom', - type: 'tool', - text: 'Zoom', - svgUrl: `${Icons}#icon-tools-zoom`, - active: false, - }, - { - command: 'Wwwc', - type: 'tool', - text: 'Levels', - svgUrl: `${Icons}#icon-tools-levels`, - active: true, - }, - { - command: 'Pan', - type: 'tool', - text: 'Pan', - svgUrl: `${Icons}#icon-tools-pan`, - active: false, - }, - { - command: 'Length', - type: 'tool', - text: 'Length', - svgUrl: `${Icons}#icon-tools-measure-temp`, - active: false, - }, - /*{ - command: 'Annotate', - type: 'tool', - text: 'Annotate', - svgUrl: `${Icons}#icon-tools-measure-non-target`, - active: false - },*/ - { - command: 'Angle', - type: 'tool', - text: 'Angle', - iconClasses: 'fa fa-angle-left', - active: false, - }, - { - command: 'Bidirectional', - type: 'tool', - text: 'Bidirectional', - svgUrl: `${Icons}#icon-tools-measure-target`, - active: false, - }, - { - command: 'Brush', - type: 'tool', - text: 'Brush', - iconClasses: 'fa fa-circle', - active: false, - }, - { - command: 'FreehandMouse', - type: 'tool', - text: 'Freehand', - iconClasses: 'fa fa-star', - active: false, - }, - { - command: 'reset', - type: 'command', - text: 'Reset', - svgUrl: `${Icons}#icon-tools-reset`, - active: false, - }, - ] - - const buttonsAction = OHIF.redux.actions.setAvailableButtons(defaultButtons) - - store.dispatch(buttonsAction) -} diff --git a/src/utils/getDefaultToolbarButtons.js b/src/utils/getDefaultToolbarButtons.js index 93ca8bd15..7c7d584fd 100644 --- a/src/utils/getDefaultToolbarButtons.js +++ b/src/utils/getDefaultToolbarButtons.js @@ -8,7 +8,10 @@ export default function(baseDirectory = '/') { baseDirectory[baseDirectory.length - 1] === '/' ? baseDirectory : `${baseDirectory}/` - const relativePathToIcons = `${sanitizedBaseDirectory}${iconsFileName}` + const relativePathToIcons = `${sanitizedBaseDirectory}${iconsFileName}`.replace( + '//', + '/' + ) return [ {