From cfa70568bbb5a34682f1938074058974ed4fbbe5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 17 Aug 2021 14:36:38 +0300 Subject: [PATCH] [DE] Draw arrows when move review balloons top or bottom --- apps/common/main/lib/view/ReviewPopover.js | 56 ++++++++++----- apps/common/main/resources/less/comments.less | 69 ++++++++++++++----- 2 files changed, 88 insertions(+), 37 deletions(-) diff --git a/apps/common/main/lib/view/ReviewPopover.js b/apps/common/main/lib/view/ReviewPopover.js index a4ffc454e..36c6f6ac3 100644 --- a/apps/common/main/lib/view/ReviewPopover.js +++ b/apps/common/main/lib/view/ReviewPopover.js @@ -738,7 +738,8 @@ define([ leftPos = Math.min(sdkBoundsLeft + posX + this.arrow.width, sdkBoundsLeft + this.sdkBounds.width - this.$window.outerWidth() - 25); leftPos = Math.max(sdkBoundsLeft + sdkPanelLeftWidth + this.arrow.width, leftPos); - arrowView.removeClass('right').addClass('left'); + arrowView.removeClass('right top bottom').addClass('left'); + arrowView.css({left: ''}); if (!_.isUndefined(leftX)) { windowWidth = this.$window.outerWidth(); @@ -805,6 +806,7 @@ define([ sdkPanelTop = '', sdkPanelHeight = 0, arrowPosY = 0, + arrowPosX = 0, windowHeight = 0, outerHeight = 0, topPos = 0, @@ -842,8 +844,10 @@ define([ var movePos = this.isOverCursor(); if (movePos) { - var newTopDown = movePos[1] + sdkPanelHeight,// try move down - newTopUp = movePos[0] + sdkPanelHeight; // try move up + var leftPos = parseInt(this.$window.css('left')) - this.arrow.width, + newTopDown = movePos[1][1] + sdkPanelHeight + this.arrow.width,// try move down + newTopUp = movePos[0][1] + sdkPanelHeight - this.arrow.width, // try move up + isMoveDown = false; if (newTopDown + outerHeight>sdkBoundsTop + sdkBoundsHeight) { var diffDown = sdkBoundsTop + sdkBoundsHeight - newTopDown; if (newTopUp - outerHeightleftPos && x0leftPos && x1y1) ? [x0, y0] : [x1, y1],// try move down + newUp = (y0