LT-275: Allowing label edition
This commit is contained in:
parent
ae0b03c05c
commit
72339b57a6
@ -1,6 +1,6 @@
|
||||
<template name="measureFlow">
|
||||
<div class="measure-flow {{#if this.threeColumns}}tree-columns{{/if}} {{instance.state.get}}" style="top:{{choose position.y 0}}px;left:{{choose position.x 0}}px" tabindex="-1">
|
||||
<button class="btn-add">Add label</button>
|
||||
<button class="btn-add">{{#if this.measurement.location}}Edit{{else}}Add{{/if}} label</button>
|
||||
{{#if eq instance.state.get 'selected'}}
|
||||
<div class="tree-leaf">
|
||||
<i class="icon-check"></i>
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
.btn-add
|
||||
opacity: 0
|
||||
outline: none
|
||||
|
||||
.btn-add
|
||||
theme('color', '$textColorActive')
|
||||
|
||||
@ -20,16 +20,21 @@ OHIF.measurements.toggleLabelButton = options => {
|
||||
removeButtonView();
|
||||
}
|
||||
|
||||
const tool = toolMap[options.toolData.toolType];
|
||||
const toolCollection = options.measurementApi[tool];
|
||||
const measurement = toolCollection.findOne(options.toolData.id);
|
||||
|
||||
const data = {
|
||||
measurement,
|
||||
tool,
|
||||
position: options.position,
|
||||
threeColumns: true,
|
||||
hideCommon: true,
|
||||
toolType: options.toolData.toolType,
|
||||
doneCallback(location, description) {
|
||||
options.callback(options, location, description);
|
||||
|
||||
const tool = toolMap[options.toolData.toolType];
|
||||
|
||||
options.measurementApi[tool].update(options.toolData.id, {
|
||||
toolCollection.update(measurement._id, {
|
||||
$set: {
|
||||
location,
|
||||
description
|
||||
|
||||
Loading…
Reference in New Issue
Block a user