reorganize packages, start converting overall app to react (very broken at the moment)

This commit is contained in:
Erik Ziegler committed 2018-12-12 18:06:25 +01:00
1 parent 024fe1a448
commit 5f30f7bd35
479 files changed
+5364 -11611

No files matched your search

@@ -0,0 +1,20 @@
<template name="measurementTableHUD">
<div id="measurementTableHUD" class="{{hudHidden}}">
<div class="flex-v full-height">
<div class="header">
<span>Measurements</span>
<svg class="buttonClose">
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-ui-close"}}></use>
</svg>
</div>
{{#scrollArea class='measurementTableView flex-grow fit' scrollStep=63}}
{{>measurementTableView (clone this isHud=true)}}
{{/scrollArea}}
<div class="footer">
{{#each toolbarButton in toolbarButtons}}
{{>toolbarSectionButton toolbarButton}}
{{/each}}
</div>
</div>
</div>
</template>
@@ -0,0 +1,72 @@
import { Template } from 'meteor/templating';
import { Session } from 'meteor/session';
import { ReactiveVar } from 'meteor/reactive-var';
Template.measurementTableHUD.onCreated(() => {
const instance = Template.instance();
const timepointApi = instance.data.timepointApi;
instance.isRemoved = true;
if (timepointApi) {
instance.data.timepoints = new ReactiveVar(timepointApi.currentAndPrior());
}
});
Template.measurementTableHUD.onDestroyed(() => {
const instance = Template.instance();
instance.isRemoved = true;
Session.set('measurementTableHudOpen', false);
});
Template.measurementTableHUD.onRendered(() => {
const instance = Template.instance();
instance.$('#measurementTableHUD').resizable().draggable().bounded();
});
Template.measurementTableHUD.events({
'click .buttonClose'(event, instance) {
Session.set('measurementTableHudOpen', false);
}
});
Template.measurementTableHUD.helpers({
hudHidden() {
let instance = Template.instance(),
isOpen = Session.get('measurementTableHudOpen');
if (isOpen) {
instance.isRemoved = false;
return 'dialog-animated dialog-open';
}
return instance.isRemoved !== true ? 'dialog-animated dialog-closed' : 'hidden';
},
toolbarButtons() {
let buttonData = [];
buttonData.push({
id: 'bidirectional',
title: 'Target',
classes: 'imageViewerTool toolbarSectionButton',
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-target'
});
buttonData.push({
id: 'nonTarget',
title: 'Non-Target',
classes: 'imageViewerTool toolbarSectionButton',
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-non-target'
});
buttonData.push({
id: 'length',
title: 'Temp',
classes: 'imageViewerTool toolbarSectionButton',
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-temp'
});
return buttonData;
}
});
@@ -0,0 +1,95 @@
@require '{ohif:viewerbase}/app'
$borderColor = rgba(77, 99, 110, 0.81)
#measurementTableHUD
background: rgba(0, 0, 0, 0.95)
border-radius: 8px
border: solid 1px $borderColor;
bottom: 3px
height: 326px
left: auto
overflow: hidden
position: absolute
right: 3px
top: auto
width: 318px
z-index: 1
.measurementTableView .scrollable
margin-left: 0
padding-left: 0
.header
theme('background', '$uiGrayDarkest')
theme('color', '$textSecondaryColor')
border-bottom: $uiBorderThickness solid $borderColor
font-weight: 300
font-size: 20px
height: 55px
line-height: 55px
position: relative
text-align: center
width: 100%
svg.buttonClose
theme('color', '$defaultColor')
cursor: pointer
height: 14px
position: absolute
right: 14px
theme('stroke', '$defaultColor')
top: 20px
width: 14px
.measurementTableView
height: calc(100% - 55px - 70px)
padding-bottom: 20px
.footer
theme('background', '$uiGrayDarkest')
border-top: $uiBorderThickness solid $borderColor
height: 70px
padding: 10px
.toolbarSectionButton
display: inline-block
theme('color', '$defaultColor')
theme('fill', '$defaultColor')
theme('stroke', '$defaultColor')
padding: 0 10px
height: $toolbarHeight
min-width: 30px
cursor: pointer
text-align: center
&.disabled
opacity: 0.5
cursor: not-allowed
.buttonLabel
font-size: 12px
.svgContainer
margin: 0 auto
text-align: center
svg
background-color: transparent
margin: 2px
width: 21px
height: 21px
&:active, &.active
theme('color', '$activeColor')
svg
theme('fill', '$activeColor')
theme('stroke', '$activeColor')
&:hover
theme('color', '$hoverColor')
svg
theme('fill', '$hoverColor')
theme('stroke', '$hoverColor')