LT-352: Fixing Non-Target dialog positioning
This commit is contained in:
1 parent
d84435a6f1
commit
a21479e1d1
5 files changed
+55
-5
No files matched your search
@@ -43,10 +43,19 @@ Template.dialogForm.onCreated(() => {
|
||||
Template.dialogForm.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
// Create the bootstrap modal
|
||||
const $modal = instance.$('.modal');
|
||||
$modal.modal({
|
||||
// Allow options ovewrite
|
||||
const modalOptions = _.extend({
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
});
|
||||
}, instance.data.modalOptions);
|
||||
|
||||
const $modal = instance.$('.modal');
|
||||
|
||||
// Create the bootstrap modal
|
||||
$modal.modal(modalOptions);
|
||||
|
||||
const position = instance.data.position;
|
||||
if (position) {
|
||||
OHIF.ui.repositionDialog($modal, position.x, position.y);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user