ohif-viewer/Packages/ohif-hotkeys/client/components/formTable.js

18 lines
503 B
JavaScript
Raw Normal View History

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;
}
});