mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b376bf938c
1 changed files with 9 additions and 3 deletions
|
|
@ -12,7 +12,8 @@ import {
|
||||||
focusByWbr,
|
focusByWbr,
|
||||||
focusSideBlock,
|
focusSideBlock,
|
||||||
getEditorRange,
|
getEditorRange,
|
||||||
getSelectionOffset, setLastNodeRange,
|
getSelectionOffset,
|
||||||
|
setLastNodeRange,
|
||||||
} from "../util/selection";
|
} from "../util/selection";
|
||||||
import {Constants} from "../../constants";
|
import {Constants} from "../../constants";
|
||||||
import {getSearch, isMobile} from "../../util/functions";
|
import {getSearch, isMobile} from "../../util/functions";
|
||||||
|
|
@ -25,10 +26,12 @@ import {dropEvent} from "../util/editorCommonEvent";
|
||||||
import {input} from "./input";
|
import {input} from "./input";
|
||||||
import {
|
import {
|
||||||
getContenteditableElement,
|
getContenteditableElement,
|
||||||
getLastBlock, getNextBlock,
|
getLastBlock,
|
||||||
|
getNextBlock,
|
||||||
getPreviousHeading,
|
getPreviousHeading,
|
||||||
getTopAloneElement,
|
getTopAloneElement,
|
||||||
hasNextSibling, hasPreviousSibling,
|
hasNextSibling,
|
||||||
|
hasPreviousSibling,
|
||||||
isNotEditBlock
|
isNotEditBlock
|
||||||
} from "./getBlock";
|
} from "./getBlock";
|
||||||
import {transaction, updateTransaction} from "./transaction";
|
import {transaction, updateTransaction} from "./transaction";
|
||||||
|
|
@ -568,6 +571,9 @@ export class WYSIWYG {
|
||||||
}
|
}
|
||||||
newHeight = y - newTop;
|
newHeight = y - newTop;
|
||||||
}
|
}
|
||||||
|
if (newHeight < 4) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
protyle.selectElement.setAttribute("style", `background-color: ${protyle.selectElement.style.backgroundColor};top:${newTop}px;height:${newHeight}px;left:${newLeft + 2}px;width:${newWidth - 2}px;`);
|
protyle.selectElement.setAttribute("style", `background-color: ${protyle.selectElement.style.backgroundColor};top:${newTop}px;height:${newHeight}px;left:${newLeft + 2}px;width:${newWidth - 2}px;`);
|
||||||
const newMouseElement = document.elementFromPoint(moveEvent.clientX, moveEvent.clientY);
|
const newMouseElement = document.elementFromPoint(moveEvent.clientX, moveEvent.clientY);
|
||||||
if (mouseElement && mouseElement.isSameNode(newMouseElement) && !mouseElement.classList.contains("protyle-wysiwyg") &&
|
if (mouseElement && mouseElement.isSameNode(newMouseElement) && !mouseElement.classList.contains("protyle-wysiwyg") &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue