From 6ca200e41a21effca8bac36e44d78999044672b8 Mon Sep 17 00:00:00 2001 From: Vladimir Potekhin Date: Fri, 15 Mar 2024 17:54:42 +0300 Subject: [PATCH 1/2] fix(core): disable isObscured check for `HintPointer` --- projects/core/directives/hint/hint-hover.directive.ts | 7 ++++++- .../demo/src/modules/charts/pie-chart/examples/2/index.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/core/directives/hint/hint-hover.directive.ts b/projects/core/directives/hint/hint-hover.directive.ts index e5088be3d14c..7700d1230799 100644 --- a/projects/core/directives/hint/hint-hover.directive.ts +++ b/projects/core/directives/hint/hint-hover.directive.ts @@ -31,7 +31,12 @@ export class TuiHintHoverDirective extends TuiDriver { ), ).pipe( filter(() => this.enabled), - map(value => value && !tuiIsObscured(this.el.nativeElement)), + map( + value => + value && + (!tuiIsObscured(this.el.nativeElement) || + this.el.nativeElement.hasAttribute('tuiHintPointer')), + ), tap(visible => { this.visible = visible; }), diff --git a/projects/demo/src/modules/charts/pie-chart/examples/2/index.ts b/projects/demo/src/modules/charts/pie-chart/examples/2/index.ts index 44c80ba38a99..b1d8772d09e5 100644 --- a/projects/demo/src/modules/charts/pie-chart/examples/2/index.ts +++ b/projects/demo/src/modules/charts/pie-chart/examples/2/index.ts @@ -10,6 +10,6 @@ import {encapsulation} from '@demo/emulate/encapsulation'; changeDetection, }) export class TuiPieChartExample2 { - readonly value = [13769, 12367, 10172, 3018, 2592]; + readonly value = [100, 200, 300, 400, 500]; readonly labels = ['Food', 'Cafe', 'Open Source', 'Taxi', 'Other']; } From 22614e370e050f98698fcd5cbb4b798d441796f6 Mon Sep 17 00:00:00 2001 From: Vladimir Potekhin Date: Mon, 18 Mar 2024 09:49:20 +0300 Subject: [PATCH 2/2] chore: fix comment --- projects/core/directives/hint/hint-hover.directive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/core/directives/hint/hint-hover.directive.ts b/projects/core/directives/hint/hint-hover.directive.ts index 7700d1230799..06c2b03b0df1 100644 --- a/projects/core/directives/hint/hint-hover.directive.ts +++ b/projects/core/directives/hint/hint-hover.directive.ts @@ -34,8 +34,8 @@ export class TuiHintHoverDirective extends TuiDriver { map( value => value && - (!tuiIsObscured(this.el.nativeElement) || - this.el.nativeElement.hasAttribute('tuiHintPointer')), + (this.el.nativeElement.hasAttribute('tuiHintPointer') || + !tuiIsObscured(this.el.nativeElement)), ), tap(visible => { this.visible = visible;