MCPcopy Create free account
hub / github.com/cli-table/cli-table3 / drawEmpty

Method drawEmpty

src/cell.js:292–306  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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
309class ColSpanCell {

Callers 2

drawMethod · 0.95
cell-test.jsFile · 0.80

Calls 1

stylizeLineMethod · 0.95

Tested by

no test coverage detected