Skip to content

Commit

Permalink
afetr QA
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasOsti committed Sep 18, 2024
1 parent 348c5cf commit 73c6307
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const setPanelContentMaxHeight = (balloonView) => {
const HEADER_HEIGHT = 90;
const MIN_HEIGHT_VALUE = 220;
const { innerHeight: windowHeight } = window;
const { top: panelTopPosition, element: panelNode } = balloonView;
const panelHeader = panelNode.querySelector('.ibexa-custom-tag-panel-header');
Expand All @@ -16,8 +17,9 @@ const setPanelContentMaxHeight = (balloonView) => {
const maxHeightValue = isPanelOverTopWindowEdge
? panelContent.offsetHeight - Math.abs(panelTopPosition)
: windowHeight - panelTopPosition - panelHeaderHeight - panelFooterHeight;
const panelMaxHeight = maxHeightValue < MIN_HEIGHT_VALUE ? MIN_HEIGHT_VALUE : maxHeightValue;

panelContent.style.maxHeight = `${maxHeightValue}px`;
panelContent.style.maxHeight = `${panelMaxHeight}px`;
};

export { setPanelContentMaxHeight };

0 comments on commit 73c6307

Please sign in to comment.