Merge pull request #1626 from okriuchykhin/ok_SCI_3174

Fix comment menu position on canvas [SCI-3174]
This commit is contained in:
Alex Kriuchykhin 2019-04-02 15:10:14 +02:00 committed by GitHub
commit 93350d1ac8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -209,6 +209,8 @@ var Comments = (function() {
var offset = useParentOffset ? $el.offset().top : $el.position().top;
$el.find('.dropdown-menu-fixed')
.offset({ top: (offset + <%= Constants::DROPDOWN_TOP_OFFSET_PX %>) });
$el.find('.dropdown-menu-fixed')
.position({ top: $el.position().top });
});
}

View file

@ -317,9 +317,15 @@ function initializeFullZoom() {
restoreDraggablePosition($("#diagram"), $("#canvas-container"));
// Initialize comments
Comments.initCommentOptions("ul.content-comments", false);
Comments.initCommentOptions("ul.content-comments", true);
Comments.initEditComments(".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() {