ohif-viewer/Packages/ohif-hotkeys/client/components/formTable.js
2017-06-14 09:19:49 +02:00

18 lines
503 B
JavaScript

import { Template } from 'meteor/templating';
import { OHIF } from 'meteor/ohif:core';
Template.hotkeysFormTable.helpers({
getLabel(input) {
let result = input.label;
if (input.key.indexOf('WLPreset') === 0) {
const presetIndex = parseInt(input.key.replace('WLPreset', ''));
const preset = OHIF.viewer.wlPresets[presetIndex];
if (preset.id) {
result += ` (${preset.id})`;
}
}
return result;
}
});