Skip to content

Commit

Permalink
feat: use tui.rectangle for background object
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Beast committed Aug 1, 2023
1 parent 1eedbfd commit 4d5e6c0
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/tui.ts
Original file line number Diff line number Diff line change
@@ -111,23 +111,9 @@ export class Tui extends EventEmitter<

background?.erase();

const { columns, rows } = canvas.size.peek();

const backgroundRectangle = {
column: 0,
row: 0,
width: columns,
height: rows,
};

const box = new BoxObject({
canvas,
rectangle: new Computed(() => {
const { columns, rows } = this.canvas.size.value;
backgroundRectangle.width = columns;
backgroundRectangle.height = rows;
return backgroundRectangle;
}),
rectangle: this.rectangle,
style,
zIndex: -1,
});

0 comments on commit 4d5e6c0

Please sign in to comment.