Fixing measurement delete action
This commit is contained in:
parent
20a355054d
commit
efa7d48da1
@ -1,23 +1,27 @@
|
|||||||
<template name="measurementTable">
|
<template name="measurementTable">
|
||||||
<div id="measurementTableContainer">
|
<div id="measurementTableContainer" class="flex-v">
|
||||||
{{#if this.timepoints.get.length}}
|
<div class="measurementTableHeader">
|
||||||
<div class="measurementTableLayoutChanger viewerRoundedButtonGroup">
|
{{#if this.timepoints.get.length}}
|
||||||
{{>roundedButtonGroup buttonGroupData}}
|
<div class="measurementTableLayoutChanger viewerRoundedButtonGroup">
|
||||||
</div>
|
{{>roundedButtonGroup buttonGroupData}}
|
||||||
{{/if}}
|
|
||||||
<div class="measurementTableTimepointHeaderRow">
|
|
||||||
{{#if hasWarnings}}
|
|
||||||
<div class="warning-status">
|
|
||||||
<svg>
|
|
||||||
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-ui-warning"}}></use>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#each timepoint in this.timepoints.get}}
|
<div class="measurementTableTimepointHeaderRow">
|
||||||
{{>measurementTableTimepointHeader (clone this timepoint)}}
|
{{#if hasWarnings}}
|
||||||
{{/each}}
|
<div class="warning-status">
|
||||||
<!-- TODO: Add header for cross-sectional / non-longitudinal data -->
|
<svg>
|
||||||
|
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-ui-warning"}}></use>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#each timepoint in this.timepoints.get}}
|
||||||
|
{{>measurementTableTimepointHeader (clone this timepoint)}}
|
||||||
|
{{/each}}
|
||||||
|
<!-- TODO: Add header for cross-sectional / non-longitudinal data -->
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{>measurementTableView (clone this)}}
|
{{#scrollArea class='measurementTableView flex-grow fit' scrollStep=63}}
|
||||||
|
{{>measurementTableView (clone this)}}
|
||||||
|
{{/scrollArea}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
<template name="measurementTableHUD">
|
<template name="measurementTableHUD">
|
||||||
<div id="measurementTableHUD" class="{{hudHidden}}">
|
<div id="measurementTableHUD" class="{{hudHidden}}">
|
||||||
<div class="header">
|
<div class="flex-v full-height">
|
||||||
<span>Measurements</span>
|
<div class="header">
|
||||||
<svg class="buttonClose">
|
<span>Measurements</span>
|
||||||
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-ui-close"}}></use>
|
<svg class="buttonClose">
|
||||||
</svg>
|
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-ui-close"}}></use>
|
||||||
</div>
|
</svg>
|
||||||
{{>measurementTableView (clone this)}}
|
</div>
|
||||||
<div class="footer">
|
{{#scrollArea class='measurementTableView flex-grow fit' scrollStep=63}}
|
||||||
{{#each toolbarButton in toolbarButtons}}
|
{{>measurementTableView (clone this isHud=true)}}
|
||||||
{{>toolbarSectionButton toolbarButton}}
|
{{/scrollArea}}
|
||||||
{{/each}}
|
<div class="footer">
|
||||||
|
{{#each toolbarButton in toolbarButtons}}
|
||||||
|
{{>toolbarSectionButton toolbarButton}}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -16,7 +16,7 @@ $borderColor = rgba(77, 99, 110, 0.81)
|
|||||||
width: 318px
|
width: 318px
|
||||||
z-index: 10000
|
z-index: 10000
|
||||||
|
|
||||||
.measurementTableView.scrollArea
|
.measurementTableView .scrollable
|
||||||
margin-left: 0
|
margin-left: 0
|
||||||
padding-left: 0
|
padding-left: 0
|
||||||
|
|
||||||
@ -42,17 +42,14 @@ $borderColor = rgba(77, 99, 110, 0.81)
|
|||||||
top: 20px
|
top: 20px
|
||||||
width: 14px
|
width: 14px
|
||||||
|
|
||||||
.measurementTableView.scrollArea
|
.measurementTableView
|
||||||
height: calc(100% - 55px - 70px)
|
height: calc(100% - 55px - 70px)
|
||||||
padding-bottom: 20px
|
padding-bottom: 20px
|
||||||
|
|
||||||
.footer
|
.footer
|
||||||
theme('background', '$uiGrayDarkest')
|
theme('background', '$uiGrayDarkest')
|
||||||
border-top: $uiBorderThickness solid $borderColor
|
border-top: $uiBorderThickness solid $borderColor
|
||||||
width: 100%
|
|
||||||
height: 70px
|
height: 70px
|
||||||
position: absolute
|
|
||||||
bottom: 0
|
|
||||||
padding: 10px
|
padding: 10px
|
||||||
|
|
||||||
.toolbarSectionButton
|
.toolbarSectionButton
|
||||||
|
|||||||
@ -65,6 +65,7 @@ Template.measurementTableRow.events({
|
|||||||
|
|
||||||
'click .js-delete'(event, instance) {
|
'click .js-delete'(event, instance) {
|
||||||
const dialogSettings = {
|
const dialogSettings = {
|
||||||
|
class: 'themed',
|
||||||
title: 'Delete measurements',
|
title: 'Delete measurements',
|
||||||
message: 'Are you sure you want to delete the measurement across all timepoints?',
|
message: 'Are you sure you want to delete the measurement across all timepoints?',
|
||||||
position: {
|
position: {
|
||||||
|
|||||||
@ -93,9 +93,15 @@ Template.measurementTableTimepointCell.events({
|
|||||||
if (keyCode === keys.DELETE || keyCode === keys.BACKSPACE || (keyCode === keys.D && event.ctrlKey === true)) {
|
if (keyCode === keys.DELETE || keyCode === keys.BACKSPACE || (keyCode === keys.D && event.ctrlKey === true)) {
|
||||||
const timepointId = instance.data.timepointId;
|
const timepointId = instance.data.timepointId;
|
||||||
|
|
||||||
|
const offset = $(event.currentTarget).offset();
|
||||||
const dialogSettings = {
|
const dialogSettings = {
|
||||||
|
class: 'themed',
|
||||||
title: 'Delete measurements',
|
title: 'Delete measurements',
|
||||||
message: 'Are you sure you want to delete this measurement?'
|
message: 'Are you sure you want to delete this measurement?',
|
||||||
|
position: {
|
||||||
|
x: offset.left,
|
||||||
|
y: offset.top
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
OHIF.ui.showDialog('dialogConfirm', dialogSettings).then(() => {
|
OHIF.ui.showDialog('dialogConfirm', dialogSettings).then(() => {
|
||||||
|
|||||||
@ -1,39 +1,39 @@
|
|||||||
<template name="measurementTableView">
|
<template name="measurementTableView">
|
||||||
<div class="measurementTableView scrollArea">
|
{{#let config=measurementConfiguration groups=measurementGroups.get}}
|
||||||
{{#let config=measurementConfiguration groups=measurementGroups.get}}
|
{{#each measurementGroup in groups}}
|
||||||
{{#each measurementGroup in groups}}
|
{{! #if hasMeasurements measurementGroup.toolGroup.id}}
|
||||||
{{! #if hasMeasurements measurementGroup.toolGroup.id}}
|
{{>measurementTableHeaderRow (clone this
|
||||||
{{>measurementTableHeaderRow (clone this
|
toolGroup=measurementGroup.toolGroup
|
||||||
toolGroup=measurementGroup.toolGroup
|
measurementRows=measurementGroup.measurementRows)}}
|
||||||
measurementRows=measurementGroup.measurementRows)}}
|
{{! /if}}
|
||||||
{{! /if}}
|
{{#each rowItem in measurementGroup.measurementRows}}
|
||||||
{{#each rowItem in measurementGroup.measurementRows}}
|
{{>measurementTableRow (clone this rowItem=rowItem)}}
|
||||||
{{>measurementTableRow (clone this rowItem=rowItem)}}
|
|
||||||
{{/each}}
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
{{#each newLesionGroup in config.newLesions}}
|
{{#each newLesionGroup in config.newLesions}}
|
||||||
{{#let toolGroup=(getNewLesionsToolGroup newLesionGroup)}}
|
{{#let toolGroup=(getNewLesionsToolGroup newLesionGroup)}}
|
||||||
{{#let newMeasurements=(newLesionsMeasurements toolGroup)}}
|
{{#let newMeasurements=(newLesionsMeasurements toolGroup)}}
|
||||||
{{#if newMeasurements.length}}
|
{{#if newMeasurements.length}}
|
||||||
{{#let collection=newMeasurements}}
|
{{#let collection=newMeasurements}}
|
||||||
{{>measurementTableHeaderRow (clone this
|
{{>measurementTableHeaderRow (clone this
|
||||||
toolGroup=toolGroup
|
toolGroup=toolGroup
|
||||||
measurementRows=collection)}}
|
measurementRows=collection)}}
|
||||||
|
|
||||||
{{#each entry in collection}}
|
{{#each entry in collection}}
|
||||||
{{>measurementTableRow (clone this rowItem=entry)}}
|
{{>measurementTableRow (clone this rowItem=entry)}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
|
{{#unless this.isHud}}
|
||||||
{{#if or (hasMeasurements 'targets') (hasMeasurements 'nonTargets')}}
|
{{#if or (hasMeasurements 'targets') (hasMeasurements 'nonTargets')}}
|
||||||
<div class="report-area">
|
<div class="report-area">
|
||||||
<div class="btn btn-sm js-pdf">Generate Report</div>
|
<div class="btn btn-sm js-pdf">Generate Report</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
{{/unless}}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,17 +1,6 @@
|
|||||||
@import "{ohif:design}/app"
|
@import "{ohif:design}/app"
|
||||||
|
|
||||||
.measurementTableView.scrollArea
|
.measurementTableView
|
||||||
// height: calc(100% - 105px)
|
|
||||||
height: calc(100% - 50px)
|
|
||||||
overflow-x: hidden
|
|
||||||
overflow-y: auto
|
|
||||||
margin-right: -36px
|
|
||||||
padding-right: 36px
|
|
||||||
-webkit-overflow-scrolling: touch
|
|
||||||
-ms-overflow-style: none
|
|
||||||
|
|
||||||
&::-webkit-scrollbar
|
|
||||||
display: none
|
|
||||||
|
|
||||||
.report-area
|
.report-area
|
||||||
theme('background-color', '$uiGrayDarker')
|
theme('background-color', '$uiGrayDarker')
|
||||||
|
|||||||
@ -5,6 +5,12 @@ OHIF.measurements.syncMeasurementAndToolData = measurement => {
|
|||||||
OHIF.log.info('syncMeasurementAndToolData');
|
OHIF.log.info('syncMeasurementAndToolData');
|
||||||
|
|
||||||
const toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.saveToolState();
|
const toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.saveToolState();
|
||||||
|
|
||||||
|
// Stop here if the metadata for the measurement's study is not loaded yet
|
||||||
|
const { studyInstanceUid } = measurement;
|
||||||
|
const metadata = OHIF.viewer.StudyMetadataList.findBy({ studyInstanceUid });
|
||||||
|
if (!metadata) return;
|
||||||
|
|
||||||
const imageId = OHIF.viewerbase.getImageIdForImagePath(measurement.imagePath);
|
const imageId = OHIF.viewerbase.getImageIdForImagePath(measurement.imagePath);
|
||||||
const toolType = measurement.toolType;
|
const toolType = measurement.toolType;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user