• 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/popover/popover-ref.ts
1
import { ThyAbstractInternalOverlayRef, ThyAbstractOverlayRef } from 'ngx-tethys/core';
2

3
import { OverlayRef } from '@angular/cdk/overlay';
4
import { merge } from 'rxjs';
5

6
import { ThyPopoverContainerComponent } from './popover-container.component';
7
import { ThyPopoverConfig } from './popover.config';
8
import { popoverAbstractOverlayOptions } from './popover.options';
×
9

10
export abstract class ThyPopoverRef<T, TResult = unknown, TData = unknown> extends ThyAbstractOverlayRef<
11
    T,
×
12
    ThyPopoverContainerComponent<TData>,
×
13
    TResult
×
14
> {}
15

16
export class ThyInternalPopoverRef<T, TResult = unknown>
17
    extends ThyAbstractInternalOverlayRef<T, ThyPopoverContainerComponent, TResult>
18
    implements ThyPopoverRef<T, TResult>
19
{
20
    constructor(overlayRef: OverlayRef, containerInstance: ThyPopoverContainerComponent, config: ThyPopoverConfig) {
21
        super(popoverAbstractOverlayOptions, overlayRef, containerInstance, config);
×
22
        // Note: doesn't need to unsubscribe, because `insideClicked` and `outsideClicked`
×
23
        // get completed by `ThyPopoverContainerComponent` when the view is destroyed.
24
        merge(containerInstance.insideClicked, containerInstance.outsideClicked).subscribe(() => this.close());
25
        containerInstance.updatePosition.subscribe(() => {
26
            this.updatePosition();
27
        });
28
    }
29

30
    /**
31
     * Updates the popover's position.
32
     * @param position New popover position.
33
     */
34
    updatePosition(): this {
35
        this.overlayRef.updatePosition();
36
        return this;
37
    }
38
}
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