Skip to content

Commit 6275eec

Browse files
committed
fix: Fixed column wrapping algorithm
1 parent fce05c6 commit 6275eec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/view/ui/Content.svelte

+2-3
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
targets.forEach((b) => {
230230
temp.appendChild(b.cloneNode(true));
231231
}, 0);
232-
const splitHeight = Math.min(temp.clientHeight / 2, 600);
232+
const splitHeight = Math.min(Math.max(temp.clientHeight / 2, 600), 600);
233233
234234
temp.detach();
235235
if (columns == 1) {
@@ -240,7 +240,7 @@
240240
for (let target of targets) {
241241
columnEl.appendChild(target);
242242
if (
243-
columnEl.clientHeight + target.clientHeight > splitHeight &&
243+
columnEl.clientHeight > splitHeight &&
244244
node.childElementCount != columns
245245
) {
246246
target.detach();
@@ -249,7 +249,6 @@
249249
}
250250
}
251251
};
252-
const attachTarget = (column: HTMLElement, target: HTMLElement) => {};
253252
254253
let content: HTMLElement;
255254

0 commit comments

Comments
 (0)