Skip to content

Commit

Permalink
fix: fix column wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Jan 6, 2022
1 parent 1571c16 commit ea619c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/view/ui/Content.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
export let statblock: StatblockItem[];
export let columns: number = 1;
console.log("🚀 ~ file: Content.svelte ~ line 26 ~ columns", columns);
export let ready: boolean;
const monster = getContext<Monster>("monster");
Expand Down Expand Up @@ -115,9 +116,7 @@
}
try {
for (const block of blocks) {
const prop = target.createDiv(
"statblock-item-container"
);
const prop = createDiv("statblock-item-container");
new PropertyBlock({
target: prop,
props: {
Expand Down Expand Up @@ -220,7 +219,7 @@
targets.forEach((b) => {
temp.appendChild(b.cloneNode(true));
}, 0);
const splitHeight = Math.max(temp.clientHeight, 600);
const splitHeight = Math.max(temp.clientHeight / 2, 600);
temp.detach();
if (columns == 1) {
Expand All @@ -240,6 +239,7 @@
}
}
};
const attachTarget = (column: HTMLElement, target: HTMLElement) => {};
let content: HTMLElement;
Expand Down

0 comments on commit ea619c2

Please sign in to comment.