mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-08 00:04:21 +01:00
🎨 移动端数据库单元格修改
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
9fd1bf7b96
commit
66aa94568e
2 changed files with 11 additions and 6 deletions
|
|
@ -418,7 +418,16 @@ export const cellScrollIntoView = (blockElement: HTMLElement, cellElement: Eleme
|
|||
/// #if MOBILE
|
||||
const contentElement = hasClosestByClassName(blockElement, "protyle-content", true);
|
||||
if (contentElement && cellElement.getAttribute("data-dtype") !== "checkbox") {
|
||||
const keyboardToolbarTop = (window.siyuan.mobile.size.isLandscape ? window.siyuan.mobile.size.landscape.height2 : window.siyuan.mobile.size.portrait.height2) - 48;
|
||||
let keyboardToolbarTop = window.innerHeight / 2 - 48;
|
||||
if (window.siyuan.mobile.size.isLandscape) {
|
||||
if (window.siyuan.mobile.size.landscape.height1 !== window.siyuan.mobile.size.landscape.height2) {
|
||||
keyboardToolbarTop = window.siyuan.mobile.size.landscape.height2 - 48;
|
||||
}
|
||||
} else {
|
||||
if (window.siyuan.mobile.size.portrait.height1 !== window.siyuan.mobile.size.portrait.height2) {
|
||||
keyboardToolbarTop = window.siyuan.mobile.size.portrait.height2 - 48;
|
||||
}
|
||||
}
|
||||
if (cellRect.bottom > keyboardToolbarTop) {
|
||||
contentElement.scrollTop = contentElement.scrollTop + (cellRect.bottom - keyboardToolbarTop);
|
||||
} else if (cellRect.top < 110) {
|
||||
|
|
|
|||
|
|
@ -333,11 +333,7 @@ export const getPadding = (protyle: IProtyle) => {
|
|||
let left = 24;
|
||||
let bottom = 16;
|
||||
if (protyle.options.typewriterMode) {
|
||||
if (isMobile()) {
|
||||
bottom = window.innerHeight / 5;
|
||||
} else {
|
||||
bottom = protyle.element.clientHeight / 2;
|
||||
}
|
||||
bottom = protyle.element.clientHeight / 2;
|
||||
}
|
||||
if (!isMobile()) {
|
||||
let isFullWidth = protyle.wysiwyg.element.getAttribute(Constants.CUSTOM_SY_FULLWIDTH);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue