| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 1× 17× 9× 9× 11× 11× 9× 1× 1× 1× 1× | const TextCell = require("./textcell.js");
class RTextCell extends TextCell {
constructor(text) {
super(text);
}
draw(width, height) {
var result = [];
for (var i = 0; i < height; i++) {
var line = this.text[i] || "";
result.push(super.repeat(" ", width - line.length) + line);
}
return result;
}
}
const {addMapClass, findClass} = require("./registry-class");
addMapClass("Number", RTextCell);
addMapClass("RTextCell", RTextCell);
module.exports = RTextCell;
|