fix: splitview layout view size with hidden view

This commit is contained in:
RayJason 2024-07-30 15:44:38 +08:00
parent 5b9dbdf57e
commit eda3ea1210

View File

@ -811,9 +811,10 @@ export class Splitview {
return;
}
const sashCount = this.viewItems.length - 1;
const marginReducedSize =
(this.margin * sashCount) / this.viewItems.length;
const visibleViewItemCount = this.viewItems.filter((i) => i.visible).length
const sashCount = visibleViewItemCount - 1
const marginReducedSize = (this.margin * sashCount) / visibleViewItemCount
let totalLeftOffset = 0;
const viewLeftOffsets: number[] = [];