* Renders a blank line of text within the cell. Used for top and/or bottom padding. * @param drawRight - true if this method should render the right edge of the cell. * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined. * @retur
(drawRight, spanningCell)
| 290 | * @returns {String} |
| 291 | */ |
| 292 | drawEmpty(drawRight, spanningCell) { |
| 293 | let left = this.chars[this.x == 0 ? 'left' : 'middle']; |
| 294 | if (this.x && spanningCell && this.cells) { |
| 295 | let cellLeft = this.cells[this.y + spanningCell][this.x - 1]; |
| 296 | while (cellLeft instanceof ColSpanCell) { |
| 297 | cellLeft = this.cells[cellLeft.y][cellLeft.x - 1]; |
| 298 | } |
| 299 | if (!(cellLeft instanceof RowSpanCell)) { |
| 300 | left = this.chars['rightMid']; |
| 301 | } |
| 302 | } |
| 303 | let right = drawRight ? this.chars['right'] : ''; |
| 304 | let content = utils.repeat(' ', this.width); |
| 305 | return this.stylizeLine(left, content, right); |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | class ColSpanCell { |
no test coverage detected