mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-11 06:30:57 +08:00
This commit is contained in:
parent
a04f7107fd
commit
a8fc5a62f9
@ -38,10 +38,13 @@ export class Dialog {
|
|||||||
if (!isMobile() && options.positionId) {
|
if (!isMobile() && options.positionId) {
|
||||||
const dialogPosition = window.siyuan.storage[Constants.LOCAL_DIALOGPOSITION][options.positionId];
|
const dialogPosition = window.siyuan.storage[Constants.LOCAL_DIALOGPOSITION][options.positionId];
|
||||||
if (dialogPosition) {
|
if (dialogPosition) {
|
||||||
left = dialogPosition.left + "px";
|
if (dialogPosition.left + dialogPosition.width <= window.innerWidth &&
|
||||||
top = dialogPosition.top + "px";
|
dialogPosition.top + dialogPosition.height <= window.innerHeight) {
|
||||||
options.width = dialogPosition.width + "px";
|
left = dialogPosition.left + "px";
|
||||||
options.height = dialogPosition.height + "px";
|
top = dialogPosition.top + "px";
|
||||||
|
options.width = dialogPosition.width + "px";
|
||||||
|
options.height = dialogPosition.height + "px";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.element.innerHTML = `<div class="b3-dialog" style="z-index: ${++window.siyuan.zIndex};${typeof left === "string" ? "display:block" : ""}">
|
this.element.innerHTML = `<div class="b3-dialog" style="z-index: ${++window.siyuan.zIndex};${typeof left === "string" ? "display:block" : ""}">
|
||||||
|
Loading…
Reference in New Issue
Block a user