mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
4c44331e6d
commit
eb1e7b0bf2
1 changed files with 2 additions and 0 deletions
|
|
@ -35,6 +35,8 @@ export class Menu {
|
|||
if (rect.right > window.innerWidth && (rect.left - this.element.clientWidth - rect.width > 0 ||
|
||||
Math.abs(rect.left - this.element.clientWidth - rect.width) < (rect.right - window.innerWidth))) {
|
||||
style = "left:auto;right:100%;";
|
||||
} else if (rect.right > window.innerWidth) {
|
||||
style = `z-index:1;mix-blend-mode: normal;left:${window.innerWidth - rect.width}px;`;
|
||||
}
|
||||
if (rect.bottom > window.innerHeight) {
|
||||
style += `top: auto;bottom:-5px;max-height:${Math.min(rect.top, window.innerHeight * 0.4)}px`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue