mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
initDefaultWidht() for various views
This commit is contained in:
parent
0cfd45d8a9
commit
3aa23db306
8 changed files with 16 additions and 2 deletions
|
@ -100,6 +100,10 @@ function View(options) {
|
|||
//this.client.term.write(ansi.setCursorStyle(this.cursorStyle));
|
||||
this.client.term.rawWrite('show' === this.cursor ? ansi.showCursor() : ansi.hideCursor());
|
||||
};
|
||||
|
||||
this.initDefaultWidth = function(width = 15) {
|
||||
this.dimens.width = this.dimens.width || Math.min(width, this.client.term.termWidth - this.position.col);
|
||||
};
|
||||
}
|
||||
|
||||
util.inherits(View, events.EventEmitter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue