mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-23 09:20:05 +00:00
fix valign option.
This commit is contained in:
parent
2640838f33
commit
b9a94f63ce
@ -3741,7 +3741,7 @@ Element.prototype.render = function() {
|
||||
} else if (this.valign === 'bottom') {
|
||||
visible -= this._clines.length;
|
||||
}
|
||||
yi += visible;
|
||||
ci -= visible * (xl - xi);
|
||||
}
|
||||
}
|
||||
|
||||
|
27
test/widget-valign.js
Normal file
27
test/widget-valign.js
Normal file
@ -0,0 +1,27 @@
|
||||
var blessed = require('../')
|
||||
, screen;
|
||||
|
||||
screen = blessed.screen({
|
||||
dump: __dirname + '/logs/valign.log',
|
||||
smartCSR: true,
|
||||
autoPadding: false
|
||||
});
|
||||
|
||||
var box = blessed.box({
|
||||
parent: screen,
|
||||
top: 'center',
|
||||
left: 'center',
|
||||
width: '50%',
|
||||
height: 5,
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
// valign: 'bottom',
|
||||
content: 'Foobar.',
|
||||
border: 'line'
|
||||
});
|
||||
|
||||
screen.key('q', function() {
|
||||
return process.exit(0);
|
||||
});
|
||||
|
||||
screen.render();
|
Loading…
x
Reference in New Issue
Block a user