Im-Beast / deno_tui

🦕 Deno module for creating Terminal User Interfaces
https://deno.land/x/tui
MIT License
266 stars 18 forks source link

bug: Label width not calculated correctly #43

Open mabasic opened 8 months ago

mabasic commented 8 months ago

Bug description A clear and concise description of what the bug is.

When I pass a figlet to Label text and in rectangle type only column and row. The class should automatically detect width and height, but when the figlet changes the width is not calculated correctly and the text inside (figlet) is cut short.

But when a provide a known width amd height, then the text is never cut short and works as expected.

Also the types for Label rectangle complains when I pass width, height, row and column, but does not complain when I pass only column and row.

Expected behavior What you expected to happen instead.

The label width should be calculated correctly.