This commit is contained in:
Christopher Jeffrey 2015-04-02 07:24:25 -07:00
parent 144dcce30a
commit c8007331b0
2 changed files with 36 additions and 0 deletions

View File

@ -8339,6 +8339,10 @@ helpers.parseTags = function(text) {
helpers.generateTags = generateTags;
helpers.textLength = function(text) {
return Element.prototype.textLength.call({ options: { tags: true } }, text);
};
helpers.attrToBinary = function(obj, fg, bg, target) {
return Element.prototype.sattr.call(target || {}, obj, fg, bg);
};

32
test/widget-autopad.js Normal file
View File

@ -0,0 +1,32 @@
var blessed = require('../')
, screen;
screen = blessed.screen({
dump: __dirname + '/logs/autopad.log',
smartCSR: true,
autoPadding: true
});
var box1 = blessed.box({
parent: screen,
top: 'center',
left: 'center',
width: 20,
height: 10,
border: 'line'
});
var box2 = blessed.box({
parent: box1,
top: 0,
left: 0,
width: 10,
height: 5,
border: 'line'
});
screen.key('q', function() {
return process.exit(0);
});
screen.render();