This commit is contained in:
Vanessa 2023-12-22 13:09:44 +08:00
parent b378829fe9
commit f5ff8f74c2
9 changed files with 27 additions and 13 deletions

View file

@ -464,13 +464,11 @@ export const openCardByData = (app: App, cardsData: {
if (exit) {
return;
}
const dialogPosition = window.siyuan.storage[Constants.LOCAL_DIALOGPOSITION][Constants.DIALOG_OPENCARD];
const dialog = new Dialog({
positionId: Constants.DIALOG_OPENCARD,
content: genCardHTML({id, cardType, cardsData, isTab: false}),
width: dialogPosition ? dialogPosition.width + "px" : (isMobile() ? "100vw" : "80vw"),
height: dialogPosition ? dialogPosition.height + "px" : (isMobile() ? "100vh" : "70vh"),
left: dialogPosition?.left,
top: dialogPosition?.top,
width: isMobile() ? "100vw" : "80vw",
height: isMobile() ? "100vh" : "70vh",
destroyCallback() {
if (editor) {
editor.destroy();