mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 数据库分组划选
This commit is contained in:
parent
8d1693bd9b
commit
de670dfa8a
1 changed files with 4 additions and 2 deletions
|
@ -810,6 +810,7 @@ export class WYSIWYG {
|
|||
let lastCellElement: HTMLElement;
|
||||
const nodeRect = nodeElement.getBoundingClientRect();
|
||||
const scrollElement = nodeElement.querySelector(".av__scroll");
|
||||
const bodyElement = hasClosestByClassName(avCellElement, "av__body") as HTMLElement;
|
||||
documentSelf.onmousemove = (moveEvent: MouseEvent) => {
|
||||
const tempCellElement = hasClosestByClassName(moveEvent.target as HTMLElement, "av__cell") as HTMLElement;
|
||||
if (scrollElement.scrollWidth > scrollElement.clientWidth + 2) {
|
||||
|
@ -824,7 +825,8 @@ export class WYSIWYG {
|
|||
protyle.contentElement.scrollTop += 5;
|
||||
}
|
||||
}
|
||||
if (moveSelectCellElement && tempCellElement && tempCellElement === moveSelectCellElement) {
|
||||
if (bodyElement !== hasClosestByClassName(tempCellElement, "av__body") ||
|
||||
(moveSelectCellElement && tempCellElement && tempCellElement === moveSelectCellElement)) {
|
||||
return;
|
||||
}
|
||||
if (tempCellElement && tempCellElement.dataset.id && (event.clientX !== moveEvent.clientX || event.clientY !== moveEvent.clientY)) {
|
||||
|
@ -832,7 +834,7 @@ export class WYSIWYG {
|
|||
nodeElement.querySelectorAll(".av__cell--active").forEach((item: HTMLElement) => {
|
||||
item.classList.remove("av__cell--active");
|
||||
});
|
||||
nodeElement.querySelectorAll(".av__row").forEach((rowElement: HTMLElement, index: number) => {
|
||||
bodyElement.querySelectorAll(".av__row").forEach((rowElement: HTMLElement, index: number) => {
|
||||
if (index >= Math.min(originIndex.rowIndex, newIndex.rowIndex) && index <= Math.max(originIndex.rowIndex, newIndex.rowIndex)) {
|
||||
rowElement.querySelectorAll(".av__cell").forEach((cellElement: HTMLElement, cellIndex: number) => {
|
||||
if (cellIndex >= Math.min(originIndex.celIndex, newIndex.celIndex) && cellIndex <= Math.max(originIndex.celIndex, newIndex.celIndex)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue