Skip to content

Commit

Permalink
Merge pull request '[PDF] Fix Bug 72451' (#227) from fix/bugfix into …
Browse files Browse the repository at this point in the history
…release/v8.3.0
  • Loading branch information
Julia Radzhabova committed Jan 15, 2025
2 parents b9403f8 + 04de103 commit 149e93f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apps/pdfeditor/main/app/controller/DocumentHolderExt.js
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,20 @@ define([], function () {
var showPoint = [(bounds[0] + bounds[2])/2 - textContainer.outerWidth()/2, me.lastAnnotSelBarOnTop ? bounds[1] - textContainer.outerHeight() - 10 : bounds[3] + 10];
(showPoint[0]<0) && (showPoint[0] = 0);
showPoint[1] = Math.min(me._Height - textContainer.outerHeight(), Math.max(0, showPoint[1]));

var popover = this.getApplication().getController('Common.Controllers.Comments').getPopover();
if (popover && popover.isVisible()) {
var bounds = {
left: popover.getLeft(), right: popover.getLeft() + popover.getWidth(),
top: popover.getTop(), bottom: popover.getTop() + popover.getHeight()
},
right = showPoint[0] + textContainer.outerWidth(),
bottom = showPoint[1] + textContainer.outerHeight();
if ((right>bounds.left && right<bounds.right || showPoint[0]>bounds.left && showPoint[0]<bounds.right) &&
(showPoint[1]>bounds.top && showPoint[1]<bounds.bottom || bottom>bounds.top && bottom<bounds.bottom)) {
showPoint[0] = Common.UI.isRTL() ? bounds.right : bounds.left - textContainer.outerWidth();
}
}
textContainer.css({left: showPoint[0], top : showPoint[1]});

var diffDown = me._Height - showPoint[1] - textContainer.outerHeight(),
Expand Down

0 comments on commit 149e93f

Please sign in to comment.