File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed
Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -832,6 +832,50 @@ const list = blessed.list({
832832
833833list . setItems ( [ "string1" , "string2" , "string3" ] ) ;
834834
835+ // https://github.com/chjj/blessed/blob/master/test/widget-log.js
836+ // modified for testing purposes
837+
838+ screen = blessed . screen ( {
839+ dump : __dirname + "/logs/logger.log" ,
840+ smartCSR : true ,
841+ autoPadding : false ,
842+ warnings : true ,
843+ } ) ;
844+
845+ var logger = blessed . log ( {
846+ parent : screen ,
847+ top : "center" ,
848+ left : "center" ,
849+ width : "50%" ,
850+ height : "50%" ,
851+ border : "line" ,
852+ tags : true ,
853+ keys : true ,
854+ vi : true ,
855+ mouse : true ,
856+ scrollback : 100 ,
857+ scrollbar : {
858+ ch : " " ,
859+ track : {
860+ bg : "yellow" ,
861+ } ,
862+ style : {
863+ inverse : true ,
864+ } ,
865+ } ,
866+ } ) ;
867+
868+ logger . align = "right" ;
869+ logger . valign = "bottom" ;
870+
871+ logger . focus ( ) ;
872+
873+ screen . key ( "q" , function ( ) {
874+ return screen . destroy ( ) ;
875+ } ) ;
876+
877+ screen . render ( ) ;
878+
835879// https://github.com/chjj/blessed/blob/master/test/program-mouse.js
836880
837881const program = blessed . program ( {
Original file line number Diff line number Diff line change @@ -3073,6 +3073,12 @@ export namespace Widgets {
30733073 */
30743074 scrollOnInput : boolean ;
30753075
3076+ /**
3077+ * Content/Text alignment
3078+ */
3079+ align : "left" | "center" | "right" ;
3080+ valign : "top" | "middle" | "bottom" ;
3081+
30763082 /**
30773083 * add a log line.
30783084 */
You can’t perform that action at this time.
0 commit comments