made contentUpdated$ Observable

This commit is contained in:
Eugene Pankov 2018-07-26 22:18:50 +02:00
parent 9423ce7c10
commit 7e253d72ea

View File

@ -34,14 +34,15 @@ export class TerminalTabComponent extends BaseTabComponent {
bell$ = new Subject() bell$ = new Subject()
size: ResizeEvent size: ResizeEvent
resize$: Observable<ResizeEvent> resize$: Observable<ResizeEvent>
private resize_ = new Subject<ResizeEvent>()
input$ = new Subject<string>() input$ = new Subject<string>()
output$ = new Subject<string>() output$ = new Subject<string>()
contentUpdated$ = new Subject<void>() contentUpdated$: Observable<void>
alternateScreenActive$ = new BehaviorSubject(false) alternateScreenActive$ = new BehaviorSubject(false)
mouseEvent$ = new Subject<Event>() mouseEvent$ = new Subject<Event>()
htermVisible = false htermVisible = false
shell: IShell shell: IShell
private resize_ = new Subject<ResizeEvent>()
private contentUpdated_ = new Subject<void>()
private bellPlayer: HTMLAudioElement private bellPlayer: HTMLAudioElement
private io: any private io: any
private contextMenu: any private contextMenu: any
@ -300,13 +301,13 @@ export class TerminalTabComponent extends BaseTabComponent {
const _insertString = screen.insertString.bind(screen) const _insertString = screen.insertString.bind(screen)
screen.insertString = (data) => { screen.insertString = (data) => {
_insertString(data) _insertString(data)
this.contentUpdated$.next() this.contentUpdated_.next()
} }
const _deleteChars = screen.deleteChars.bind(screen) const _deleteChars = screen.deleteChars.bind(screen)
screen.deleteChars = (count) => { screen.deleteChars = (count) => {
let ret = _deleteChars(count) let ret = _deleteChars(count)
this.contentUpdated$.next() this.contentUpdated_.next()
return ret return ret
} }
} }
@ -458,7 +459,7 @@ export class TerminalTabComponent extends BaseTabComponent {
this.resize_.complete() this.resize_.complete()
this.input$.complete() this.input$.complete()
this.output$.complete() this.output$.complete()
this.contentUpdated$.complete() this.contentUpdated_.complete()
this.alternateScreenActive$.complete() this.alternateScreenActive$.complete()
this.mouseEvent$.complete() this.mouseEvent$.complete()
this.bell$.complete() this.bell$.complete()