mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-09 06:04:46 +08:00
Fix comment menu position on canvas [SCI-3174]
This commit is contained in:
parent
daaa6a367b
commit
91a87cbf3a
2 changed files with 9 additions and 1 deletions
|
@ -209,6 +209,8 @@ var Comments = (function() {
|
||||||
var offset = useParentOffset ? $el.offset().top : $el.position().top;
|
var offset = useParentOffset ? $el.offset().top : $el.position().top;
|
||||||
$el.find('.dropdown-menu-fixed')
|
$el.find('.dropdown-menu-fixed')
|
||||||
.offset({ top: (offset + <%= Constants::DROPDOWN_TOP_OFFSET_PX %>) });
|
.offset({ top: (offset + <%= Constants::DROPDOWN_TOP_OFFSET_PX %>) });
|
||||||
|
$el.find('.dropdown-menu-fixed')
|
||||||
|
.position({ top: $el.position().top });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -317,9 +317,15 @@ function initializeFullZoom() {
|
||||||
restoreDraggablePosition($("#diagram"), $("#canvas-container"));
|
restoreDraggablePosition($("#diagram"), $("#canvas-container"));
|
||||||
|
|
||||||
// Initialize comments
|
// Initialize comments
|
||||||
Comments.initCommentOptions("ul.content-comments", false);
|
Comments.initCommentOptions("ul.content-comments", true);
|
||||||
Comments.initEditComments(".panel.module-large .tab-content");
|
Comments.initEditComments(".panel.module-large .tab-content");
|
||||||
Comments.initDeleteComments(".panel.module-large .tab-content");
|
Comments.initDeleteComments(".panel.module-large .tab-content");
|
||||||
|
|
||||||
|
$('#diagram-container').on('shown.bs.dropdown', '.dropdown-comment', function() {
|
||||||
|
var commentMenu = $(this).find('.dropdown-menu-fixed');
|
||||||
|
commentMenu.position({ top: $(this).parent().position().top });
|
||||||
|
commentMenu.offset({ top: $(this).parent().offset().top + <%= Constants::DROPDOWN_TOP_OFFSET_PX %> });
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroyFullZoom() {
|
function destroyFullZoom() {
|
||||||
|
|
Loading…
Reference in a new issue