-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
BackgroundLayer fills the entire canvas with a single theme.colors.background color. It does not read cellData.style.bgColor to render per-cell backgrounds.
Current behavior (v0.1.0 and v0.2.1)
rc.ctx.fillStyle = rc.theme.colors.background;
rc.ctx.fillRect(0, 0, rc.canvas.width, rc.canvas.height);No per-cell background iteration exists in this layer.
Expected behavior
After the canvas-wide fill, BackgroundLayer should iterate visible cells and render individual backgrounds for cells that have style.bgColor defined:
// After canvas-wide fill:
for (const cell of visibleCells) {
if (cell.style?.bgColor) {
ctx.fillStyle = cell.style.bgColor;
ctx.fillRect(cellX, cellY, cellW, cellH);
}
}Impact
Without per-cell background rendering, applications must implement custom layers that:
- Fill opaque white to erase engine text
- Apply the desired bgColor on top
- Re-render text with correct textColor
This creates triple rendering overhead and fragile workarounds.
Versions affected
- @witqq/spreadsheet 0.1.0
- @witqq/spreadsheet 0.2.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels