Vanessa 2024-04-21 22:43:29 +08:00
parent 428d6e189d
commit 808c2b8472

View file

@ -5,6 +5,7 @@ import {matchHotKey} from "./hotKey";
import {isNotCtrl} from "./compatibility";
import {scrollCenter} from "../../util/highlightById";
import {insertEmptyBlock} from "../../block/util";
import {removeBlock} from "../wysiwyg/remove";
const scrollToView = (nodeElement: Element, rowElement: HTMLElement, protyle: IProtyle) => {
if (nodeElement.getAttribute("custom-pinthead") === "true") {
@ -230,6 +231,10 @@ export const deleteColumn = (protyle: IProtyle, range: Range, nodeElement: Eleme
if (sideCellElement.offsetLeft + sideCellElement.clientWidth > nodeElement.firstElementChild.scrollLeft + nodeElement.firstElementChild.clientWidth) {
nodeElement.firstElementChild.scrollLeft = sideCellElement.offsetLeft + sideCellElement.clientWidth - nodeElement.firstElementChild.clientWidth;
}
} else {
nodeElement.classList.add("protyle-wysiwyg--select");
removeBlock(protyle, nodeElement, range, "remove");
return;
}
const tableElement = nodeElement.querySelector("table");
for (let i = 0; i < tableElement.rows.length; i++) {