LT-275: Allowing label edition

This commit is contained in:
Bruno Alves de Faria 2016-11-06 11:58:59 +00:00 committed by Erik Ziegler
parent ae0b03c05c
commit 72339b57a6
3 changed files with 10 additions and 4 deletions

View File

@ -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>

View File

@ -13,6 +13,7 @@
.btn-add
opacity: 0
outline: none
.btn-add
theme('color', '$textColorActive')

View File

@ -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