fix(lesionTable) Remove plus icon from measurements header
This commit is contained in:
parent
6d9e9696df
commit
664b78f42c
@ -1,12 +1,5 @@
|
||||
<template name="measurementTableHeaderRow">
|
||||
<div class="measurementTableHeaderRow">
|
||||
{{#if anyUnmarkedLesionsLeft}}
|
||||
<div class="add js-setTool">
|
||||
<svg>
|
||||
<use xlink:href={{absoluteUrl "packages/ohif_viewerbase/assets/icons.svg#icon-ui-add"}}></use>
|
||||
</svg>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="type">{{toolGroup.name}}</div>
|
||||
<div class="max {{#if gt numberOfMeasurements maxNumMeasurements}}warning{{/if}}">
|
||||
{{#if getMax toolGroup.id}}
|
||||
|
||||
@ -29,37 +29,5 @@ Template.measurementTableHeaderRow.helpers({
|
||||
} else if (toolGroupId === 'newTargets') {
|
||||
return conformanceCriteria.maxNewTargets.get();
|
||||
}
|
||||
},
|
||||
|
||||
anyUnmarkedLesionsLeft() {
|
||||
// Skip New Lesions section
|
||||
const instance = Template.instance();
|
||||
const { toolGroup, measurementRows, timepointApi, measurementApi } = instance.data;
|
||||
if (!measurementRows) return;
|
||||
|
||||
const config = OHIF.measurements.MeasurementApi.getConfiguration();
|
||||
if (config.newLesions && config.newLesions.find(o => o.id === toolGroup.id)) return;
|
||||
|
||||
const current = timepointApi.current();
|
||||
const prior = timepointApi.prior();
|
||||
if (!prior) return true;
|
||||
|
||||
const currentFilter = { timepointId: current.timepointId };
|
||||
const priorFilter = { timepointId: prior.timepointId };
|
||||
const toolGroupId = toolGroup.id;
|
||||
|
||||
const numCurrent = measurementApi.fetch(toolGroupId, currentFilter).length;
|
||||
const numPrior = measurementApi.fetch(toolGroupId, priorFilter).length;
|
||||
const remaining = Math.max(numPrior - numCurrent, 0);
|
||||
return remaining > 0;
|
||||
}
|
||||
});
|
||||
|
||||
Template.measurementTableHeaderRow.events({
|
||||
'click .js-setTool'(event, instance) {
|
||||
const { toolGroup } = instance.data;
|
||||
const toolType = toolGroup.childTools[0].cornerstoneToolType;
|
||||
const activeToolId = Array.isArray(toolType) ? toolType[0] : toolType;
|
||||
Viewerbase.toolManager.setActiveTool(activeToolId);
|
||||
}
|
||||
});
|
||||
|
||||
@ -45,7 +45,7 @@ $headerRowHeight = 63px
|
||||
font-size: 22px
|
||||
font-weight: 300
|
||||
line-height: $headerRowHeight
|
||||
padding: 0 10px
|
||||
padding: 0 10px 0 40px
|
||||
text-align: left
|
||||
|
||||
.numberOfMeasurements
|
||||
|
||||
Loading…
Reference in New Issue
Block a user