Skip to content

Commit

Permalink
After QA
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasOsti committed Sep 17, 2024
1 parent 24051e5 commit e3a3fc6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const setPanelContentMaxHeight = (balloonView) => {
const HEADER_HEIGHT = 90;
const { innerHeight: windowHeight } = window;
const { top: panelTopPosition, element: panelNode } = balloonView;
const panelHeader = panelNode.querySelector('.ibexa-custom-tag-panel-header');
Expand All @@ -11,7 +12,7 @@ const setPanelContentMaxHeight = (balloonView) => {

const panelHeaderHeight = panelHeader?.offsetHeight ?? 0;
const panelFooterHeight = panelFooter?.offsetHeight ?? 0;
const isPanelOverTopWindowEdge = panelTopPosition < 0;
const isPanelOverTopWindowEdge = panelTopPosition - HEADER_HEIGHT < 0;
const maxHeightValue = isPanelOverTopWindowEdge
? panelContent.offsetHeight - Math.abs(panelTopPosition)
: windowHeight - panelTopPosition - panelHeaderHeight - panelFooterHeight;
Expand Down

0 comments on commit e3a3fc6

Please sign in to comment.