mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 12:20:16 +01:00
This commit is contained in:
parent
eb18429d6e
commit
1544786bb6
5 changed files with 96 additions and 8 deletions
|
|
@ -661,6 +661,9 @@ export const getPositionByCellElement = (cellElement: HTMLElement) => {
|
|||
let celIndex = -2;
|
||||
while (cellElement) {
|
||||
cellElement = cellElement.previousElementSibling as HTMLElement;
|
||||
if (cellElement && cellElement.classList.contains("av__colsticky")) {
|
||||
cellElement = cellElement.lastElementChild as HTMLElement;
|
||||
}
|
||||
celIndex++;
|
||||
}
|
||||
return {rowIndex, celIndex};
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ export const avKeydown = (event: KeyboardEvent, nodeElement: HTMLElement, protyl
|
|||
if (!rowElement) {
|
||||
return false;
|
||||
}
|
||||
nodeElement.querySelectorAll(".av__cell--active").forEach(item => {
|
||||
item.classList.remove("av__cell--active");
|
||||
item.querySelector(".av__drag-fill")?.remove();
|
||||
})
|
||||
if (event.key === "Escape") {
|
||||
selectCellElement.classList.remove("av__cell--select");
|
||||
selectRow(rowElement.querySelector(".av__firstcol"), "select");
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export const selectRow = (checkElement: Element, type: "toggle" | "select" | "un
|
|||
}
|
||||
const useElement = checkElement.querySelector("use");
|
||||
if (rowElement.classList.contains("av__row--header") || type === "unselectAll") {
|
||||
if ("#iconCheck" === useElement.getAttribute("xlink:href")) {
|
||||
if ("#iconCheck" === useElement.getAttribute("xlink:href") || type === "unselectAll") {
|
||||
rowElement.parentElement.querySelectorAll(".av__firstcol").forEach(item => {
|
||||
item.querySelector("use").setAttribute("xlink:href", "#iconUncheck");
|
||||
const rowItemElement = hasClosestByClassName(item, "av__row");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue