Merge branch 'master' into fix/missing-roboto-font

This commit is contained in:
Danny Brown 2019-05-19 20:15:44 -04:00 committed by GitHub
commit 7f8f84fefd
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'; import OHIF from 'ohif-core';
const { setToolActive } = OHIF.redux.actions; const { setToolActive } = OHIF.redux.actions;
const Icons = `${window.config.routerBasename}/icons.svg`; const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/');
const mapStateToProps = state => { const mapStateToProps = state => {
const activeButton = state.tools.buttons.find(tool => tool.active === true); 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, locationLabel,
} = this.state } = this.state
const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/')
if (!skipAddLabelButton) { if (!skipAddLabelButton) {
return ( return (
<> <>
@ -124,7 +126,7 @@ export default class LabellingFlow extends Component {
onClick={this.fadeOutAndLeaveFast} onClick={this.fadeOutAndLeaveFast}
> >
<svg className="checkIcon"> <svg className="checkIcon">
<use xlinkHref="/icons.svg#check-solid" /> <use xlinkHref={`${Icons}#check-solid`} />
</svg> </svg>
</div> </div>
<div className="locationDescriptionWrapper"> <div className="locationDescriptionWrapper">

View File

@ -1,7 +1,7 @@
import React from 'react' import React from 'react'
import './OHIFLogo.css' import './OHIFLogo.css'
const Icons = `${window.config.routerBasename}/icons.svg` const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/')
function OHIFLogo() { function OHIFLogo() {
return ( return (

View File

@ -36,7 +36,7 @@ const mergeProps = (propsFromState, propsFromDispatch, ownProps) => {
// TODO: Do not display certain options if the current display set // TODO: Do not display certain options if the current display set
// cannot be displayed using these view types // cannot be displayed using these view types
const Icons = `${window.config.routerBasename}/icons.svg` const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/')
const buttons = [ const buttons = [
{ {
text: 'Acquired', text: 'Acquired',

View File

@ -6,7 +6,7 @@ import ConnectedLayoutButton from './ConnectedLayoutButton'
import ConnectedPluginSwitch from './ConnectedPluginSwitch.js' import ConnectedPluginSwitch from './ConnectedPluginSwitch.js'
import './ToolbarRow.css' import './ToolbarRow.css'
const Icons = `${window.config.routerBasename}/icons.svg` const Icons = `${window.config.routerBasename}/icons.svg`.replace('//', '/')
class ToolbarRow extends Component { class ToolbarRow extends Component {
static propTypes = { 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.length - 1] === '/'
? baseDirectory ? baseDirectory
: `${baseDirectory}/` : `${baseDirectory}/`
const relativePathToIcons = `${sanitizedBaseDirectory}${iconsFileName}` const relativePathToIcons = `${sanitizedBaseDirectory}${iconsFileName}`.replace(
'//',
'/'
)
return [ return [
{ {