mirror of
https://github.com/TextPlace/CoreTextPlace.git
synced 2025-07-10 21:45:33 +00:00
fix: fill with reference
This commit is contained in:
parent
587e0558e9
commit
46a647441b
3 changed files with 14 additions and 14 deletions
|
@ -16,17 +16,17 @@ export function createSection(
|
|||
const offsetX = sx * boardConfig.sectionWidth;
|
||||
const offsetY = sy * boardConfig.sectionHeight;
|
||||
|
||||
const ch: string[][] = Array(boardConfig.sectionHeight).fill(
|
||||
Array(boardConfig.sectionWidth).fill(boardConfig.defaultCh),
|
||||
const ch: string[][] = Array(boardConfig.sectionHeight).fill([]).map(() =>
|
||||
Array(boardConfig.sectionWidth).fill(boardConfig.defaultCh)
|
||||
);
|
||||
const color: string[][] = Array(boardConfig.sectionHeight).fill(
|
||||
Array(boardConfig.sectionWidth).fill(boardConfig.defaultColor),
|
||||
const color: string[][] = Array(boardConfig.sectionHeight).fill([]).map(() =>
|
||||
Array(boardConfig.sectionWidth).fill(boardConfig.defaultColor)
|
||||
);
|
||||
const bgColor: string[][] = Array(boardConfig.sectionHeight).fill(
|
||||
Array(boardConfig.sectionWidth).fill(boardConfig.defaultBgColor),
|
||||
const bgColor: string[][] = Array(boardConfig.sectionHeight).fill([]).map(
|
||||
() => Array(boardConfig.sectionWidth).fill(boardConfig.defaultBgColor)
|
||||
);
|
||||
const width: number[][] = Array(boardConfig.sectionHeight).fill(
|
||||
Array(boardConfig.sectionWidth).fill(boardConfig.defaultWidth),
|
||||
const width: number[][] = Array(boardConfig.sectionHeight).fill([]).map(() =>
|
||||
Array(boardConfig.sectionWidth).fill(boardConfig.defaultWidth)
|
||||
);
|
||||
|
||||
return { offsetX, offsetY, ch, color, bgColor, width };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue