- legend 'text' parameter for displaying static text

- table 'resize' method
This commit is contained in:
louisnw
2023-10-09 17:30:40 +01:00
parent 8b6a92be62
commit 33be333b41
4 changed files with 40 additions and 25 deletions

View File

@ -15,8 +15,7 @@ if (!window.Table) {
this.container.style.float = position
}
this.container.style.zIndex = '2000'
this.container.style.width = width <= 1 ? width * 100 + '%' : width + 'px'
this.container.style.height = height <= 1 ? height * 100 + '%' : height + 'px'
this.reSize(width, height)
this.container.style.display = 'flex'
this.container.style.flexDirection = 'column'
this.container.style.justifyContent = 'space-between'
@ -157,6 +156,11 @@ if (!window.Table) {
this[type].push(textBox)
}
}
reSize(width, height) {
this.container.style.width = width <= 1 ? width * 100 + '%' : width + 'px'
this.container.style.height = height <= 1 ? height * 100 + '%' : height + 'px'
}
}
window.Table = Table
}