• 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

41.67
/src/resizable/resize-handles.component.ts
1
import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
2
import { InputBoolean } from 'ngx-tethys/core';
3
import { ThyResizeDirection } from './interface';
4
import { ThyResizeHandleComponent } from './resize-handle.component';
5
import { NgFor } from '@angular/common';
6

1✔
7
export const DEFAULT_RESIZE_DIRECTION: ThyResizeDirection[] = [
8
    'bottomRight',
9
    'topRight',
10
    'bottomLeft',
11
    'topLeft',
12
    'bottom',
13
    'right',
14
    'top',
15
    'left'
16
];
17

18
/**
19
 * 定义调整手柄的快捷组件
20
 * @name thy-resize-handles
1✔
21
 */
22
@Component({
×
23
    selector: 'thy-resize-handles',
×
24
    exportAs: 'thyResizeHandles',
×
25
    template: ` <thy-resize-handle *ngFor="let dir of directions" [thyLine]="thyLine" [thyDirection]="dir"></thy-resize-handle> `,
26
    changeDetection: ChangeDetectionStrategy.OnPush,
27
    standalone: true,
×
28
    imports: [NgFor, ThyResizeHandleComponent]
×
29
})
30
export class ThyResizeHandlesComponent implements OnChanges {
31
    /**
1✔
32
     * 定义调整手柄的方向
33
     * @type ThyResizeDirection[]
34
     */
35
    @Input() thyDirections: ThyResizeDirection[] = DEFAULT_RESIZE_DIRECTION;
36

1✔
37
    /**
38
     * 是否展示拖拽线
39
     */
40
    @Input() @InputBoolean() thyLine = false;
1✔
41

42
    directions = new Set<ThyResizeDirection>(this.thyDirections);
43

44
    ngOnChanges(changes: SimpleChanges): void {
45
        if (changes.thyDirections) {
46
            this.directions = new Set(changes.thyDirections.currentValue);
47
        }
48
    }
49
}
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