• 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

0.0
/src/image/preview/image-preview-ref.ts
1
import { ThyImagePreviewComponent } from './image-preview.component';
2
import { ThyDialogRef } from 'ngx-tethys/dialog';
3
import { LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';
4
import { ThyImageInfo, ThyImagePreviewOptions } from '../image.class';
×
5
import { Observable } from 'rxjs';
6

7
export class ThyImagePreviewRef {
×
8
    get componentInstance() {
×
9
        return this.dialogRef.componentInstance;
×
10
    }
×
11

12
    constructor(
13
        public previewInstance: ThyImagePreviewComponent,
14
        private config: ThyImagePreviewOptions,
×
15
        private dialogRef: ThyDialogRef<ThyImagePreviewComponent>
×
16
    ) {
17
        dialogRef
×
18
            .keydownEvents()
×
19
            .pipe()
20
            .subscribe(event => {
21
                if (!config.disableKeyboardSelectable && event.keyCode === LEFT_ARROW) {
22
                    this.prev();
23
                }
×
24
                if (!config.disableKeyboardSelectable && event.keyCode === RIGHT_ARROW) {
25
                    this.next();
26
                }
×
27
            });
28
    }
29

×
30
    next(): void {
31
        this.previewInstance.next();
32
    }
33

34
    prev(): void {
35
        this.previewInstance.prev();
36
    }
37

38
    downloadClicked(): Observable<ThyImageInfo> {
39
        return this.previewInstance.downloadClicked.asObservable();
40
    }
41
}
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