Merge pull request #444 from dannyrb/fix/icons

Fix/icons
This commit is contained in:
Danny Brown 2019-05-17 16:20:25 -04:00 committed by GitHub
commit 8978611869
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 11 additions and 95 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -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);

BIN
img/designs/open-graph.fig Normal file

Binary file not shown.

View File

@ -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}
>
<svg className="checkIcon">
<use xlinkHref="/icons.svg#check-solid" />
<use xlinkHref={`${Icons}#check-solid`} />
</svg>
</div>
<div className="locationDescriptionWrapper">

View File

@ -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 (

View File

@ -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',

View File

@ -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 = {

View File

@ -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)
}

View File

@ -8,7 +8,10 @@ export default function(baseDirectory = '/') {
baseDirectory[baseDirectory.length - 1] === '/'
? baseDirectory
: `${baseDirectory}/`
const relativePathToIcons = `${sanitizedBaseDirectory}${iconsFileName}`
const relativePathToIcons = `${sanitizedBaseDirectory}${iconsFileName}`.replace(
'//',
'/'
)
return [
{