Visual Console Refactor: now the item size can be omitted

Former-commit-id: 952e2f44613528fc91e85c8e76e505a69f73dbbc
This commit is contained in:
Alejandro Gallardo Escobar 2019-04-08 12:54:29 +02:00
parent a9c2bb9a31
commit b3bcc888df
1 changed files with 2 additions and 2 deletions

View File

@ -337,8 +337,8 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
*/
protected resizeElement(width: number, height: number): void {
// The most valuable size is the content size.
this.childElementRef.style.width = `${width}px`;
this.childElementRef.style.height = `${height}px`;
this.childElementRef.style.width = width > 0 ? `${width}px` : null;
this.childElementRef.style.height = height > 0 ? `${height}px` : null;
}
/**