Skip to content

Commit

Permalink
fix(ui5-popover): sample edited
Browse files Browse the repository at this point in the history
  • Loading branch information
LidiyaGeorgieva committed Nov 17, 2023
1 parent 16e45ec commit ed59cc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/main/src/Popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ class Popover extends Popup {
const arrowTranslateXMinimum = -(popoverSize.width / 2 - (targetRect.width / 2 + targetRect.left) + ARROW_SIZE);
arrowTranslateX = (arrowTranslateX < arrowTranslateXMinimum) ? arrowTranslateX : arrowTranslateXMinimum;
}

return {
x: Math.round(arrowTranslateX),
y: Math.round(arrowTranslateY),
Expand Down
6 changes: 6 additions & 0 deletions packages/main/test/pages/styles/PopoverArrowBounds.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,37 @@
#myBtn1 {
top: 0;
left: 0;
margin: 10px;
}

#myBtn2 {
top: 40px;
right: 0;
margin:10px;
}

#myBtn3 {
top: 50%;
left: 0;
margin:10px;
}

#myBtn4 {
top: 50%;
right: 0;
margin:10px;
}

#myBtn5 {
bottom: 0;
left: 0;
margin:10px;
}

#myBtn6 {
bottom: 0;
right: 0;
margin:10px;
}

#customSizeBtn {
Expand Down

0 comments on commit ed59cc5

Please sign in to comment.