• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / d9ae709b-3c27-4b69-b125-b8b80b54f90b

pending completion
d9ae709b-3c27-4b69-b125-b8b80b54f90b

Pull #2757

circleci

mengshuicmq
fix: fix code review
Pull Request #2757: feat(color-picker): color-picker support disabled (#INFR-8645)

98 of 6315 branches covered (1.55%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

2392 of 13661 relevant lines covered (17.51%)

83.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

26.67
/src/shared/directives/thy-contextmenu.directive.ts
1
import { Directive, Output, ElementRef, EventEmitter, OnInit, NgZone, Renderer2, HostListener, OnDestroy } from '@angular/core';
2

3
/**
4
 * @name thyContextMenu
5
 */
6
@Directive({
1✔
7
    selector: '[thyContextMenu]',
8
    standalone: true
×
9
})
×
10
export class ThyContextMenuDirective implements OnInit, OnDestroy {
×
11
    @Output() thyContextMenu = new EventEmitter();
×
12

×
13
    private removeContextListenerFn: VoidFunction;
×
14

×
15
    constructor(private ngZone: NgZone, private elementRef: ElementRef, private renderer: Renderer2) {}
×
16

17
    rightClick = (event: Event) => {
18
        event.preventDefault();
19
        this.ngZone.run(() => {
20
            this.thyContextMenu.emit(event);
×
21
        });
×
22
    };
23

24
    ngOnInit() {
25
        this.ngZone.runOutsideAngular(() => {
×
26
            this.removeContextListenerFn = this.renderer.listen(this.elementRef.nativeElement, 'contextmenu', this.rightClick);
27
        });
1✔
28
    }
29

30
    ngOnDestroy(): void {
31
        this.removeContextListenerFn();
32
    }
1✔
33
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc