mirror of
https://github.com/docmost/docmost.git
synced 2026-08-31 02:46:27 +08:00
revert unintended changes
This commit is contained in:
@@ -85,7 +85,7 @@ export function normalizeTableColumnWidths(
|
|||||||
firstRow.children('td, th').each(function () {
|
firstRow.children('td, th').each(function () {
|
||||||
count += parseInt($(this).attr('colspan') || '1', 10) || 1;
|
count += parseInt($(this).attr('colspan') || '1', 10) || 1;
|
||||||
});
|
});
|
||||||
if (count < 6) return;
|
if (count === 0) return;
|
||||||
colWidths = new Array(count).fill(DEFAULT_IMPORT_COL_WIDTH_PX);
|
colWidths = new Array(count).fill(DEFAULT_IMPORT_COL_WIDTH_PX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ export function normalizeTableColumnWidths(
|
|||||||
const slice = colWidths.slice(col, col + colspan);
|
const slice = colWidths.slice(col, col + colspan);
|
||||||
col += colspan;
|
col += colspan;
|
||||||
if (slice.length === 0 || slice.every((w) => w === null)) return;
|
if (slice.length === 0 || slice.every((w) => w === null)) return;
|
||||||
const values = slice.map((w) => w ?? DEFAULT_IMPORT_COL_WIDTH_PX);
|
const values = slice.map((w) => (w == null ? 100 : w));
|
||||||
cell.attr('colwidth', values.join(','));
|
cell.attr('colwidth', values.join(','));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user