mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-23 00:26:04 +00:00
make middle mouse button close tabs (fixes #92)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/core'
|
import { Component, Input, Output, EventEmitter, HostBinding, HostListener } from '@angular/core'
|
||||||
import { BaseTabComponent } from '../components/baseTab.component'
|
import { BaseTabComponent } from '../components/baseTab.component'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -12,4 +12,10 @@ export class TabHeaderComponent {
|
|||||||
@Input() @HostBinding('class.has-activity') hasActivity: boolean
|
@Input() @HostBinding('class.has-activity') hasActivity: boolean
|
||||||
@Input() tab: BaseTabComponent
|
@Input() tab: BaseTabComponent
|
||||||
@Output() closeClicked = new EventEmitter()
|
@Output() closeClicked = new EventEmitter()
|
||||||
|
|
||||||
|
@HostListener('auxclick', ['$event']) onClick ($event: MouseEvent): void {
|
||||||
|
if ($event.which == 2) {
|
||||||
|
this.closeClicked.emit()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user