LT-275: Adding button to add labels to measurements
This commit is contained in:
1 parent
b1eb68521a
commit
3f0b9482d1
13 files changed
+77
-13
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Blaze } from 'meteor/blaze';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
OHIF.measurements.toggleLabelButton = options => {
|
||||
const removeButtonView = () => {
|
||||
Blaze.remove(options.instance.buttonView);
|
||||
options.instance.buttonView = null;
|
||||
};
|
||||
|
||||
if (options.instance.buttonView) {
|
||||
removeButtonView();
|
||||
} else {
|
||||
const data = {
|
||||
position: options.position,
|
||||
threeColumns: true,
|
||||
hideCommon: true,
|
||||
doneCallback(data) {
|
||||
console.warn('>>>>DONE CALLBACK', data);
|
||||
removeButtonView();
|
||||
}
|
||||
};
|
||||
const view = Blaze.renderWithData(Template.measureFlow, data, options.instance.element);
|
||||
options.instance.buttonView = view;
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user