insert test: from bottom to the top, top to bottom and back.

This commit is contained in:
Christopher Jeffrey 2013-06-13 04:24:22 -05:00
parent 1765d44a69
commit 54bde3badd
1 changed files with 27 additions and 0 deletions

27
test/insert.js Normal file
View File

@ -0,0 +1,27 @@
var blessed = require('blessed')
, program = blessed();
var screen = new blessed.Screen({
program: program
});
var main = new blessed.Box({
width: screen.width,
height: screen.height,
bg: 'yellow',
top: 0,
left: 0,
content: 'Welcome to my program\na\nb\nc\nd\ne\nf\ng\nh'
});
screen.append(main);
screen.render();
screen.insertTop(1, screen.height - 3);
//screen.insertBottom(1, screen.height - 3);
//screen.insertBottom(1, screen.height - 3);
screen.on('keypress', function(ch, key) {
if (key.name === 'q') return process.exit(0);
});