Fix loading bugs. Clean up unused code.

This commit is contained in:
Sj-Si 2024-05-26 16:18:41 -04:00
parent ab05f9c6c8
commit dc5b155cda
4 changed files with 81 additions and 45 deletions

View file

@ -113,6 +113,7 @@ class ResizeGridHandle {
this.parent = parent;
this.elem = document.createElement('div');
this.elem.id = id;
this.elem.dataset.id = id;
this.axis = _axis_to_int(axis);
isNumberThrowError(this.axis);
this.elem.classList.add('resize-grid--handle');
@ -903,6 +904,11 @@ class ResizeGrid extends ResizeGridAxis {
if (!isElement(handle_elem)) {
return;
}
if (handle_elem.closest(".resize-grid").dataset.id !== this.id) {
return;
}
siblings = this.getSiblings(handle_elem);
if (!(siblings.prev instanceof ResizeGridItem) ||
!(siblings.handle instanceof ResizeGridHandle) ||