SUPPORT-8932: fix

This commit is contained in:
Artyom Hackimullin 2025-04-07 10:48:49 +03:00
parent 5ff1df5d2a
commit 40510aca34

View file

@ -1,12 +1,11 @@
import { import {
ChangeDetectionStrategy, ChangeDetectionStrategy,
ChangeDetectorRef,
Component, Component,
ElementRef,
Input, Input,
OnChanges,
SimpleChanges SimpleChanges
} from '@angular/core'; } from '@angular/core';
import {Control, Visible} from "@webbpm/base-package"; import {Visible} from "@webbpm/base-package";
@Component({ @Component({
moduleId: module.id, moduleId: module.id,
@ -14,21 +13,17 @@ import {Control, Visible} from "@webbpm/base-package";
templateUrl: `./../../../../../src/resources/template/ervu-dashboard/ErvuChartTooltip.html`, templateUrl: `./../../../../../src/resources/template/ervu-dashboard/ErvuChartTooltip.html`,
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class ErvuChartTooltip extends Control { export class ErvuChartTooltip implements OnChanges {
@Input() @Input()
public tooltipModel: any; public tooltipModel: any;
@Input() @Input()
public visible: boolean = false;
@Input()
public position: any; public position: any;
@Visible("false")
public visible: boolean = false;
@Visible("false") @Visible("false")
public items: any[]; public items: any[];
constructor(el: ElementRef, cd: ChangeDetectorRef) {
super(el, cd)
}
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {
if ('position' in changes) { if ('position' in changes) {
if (!this.tooltipModel || this.tooltipModel.opacity == 0 || this.tooltipModel.body.length == 0) { if (!this.tooltipModel || this.tooltipModel.opacity == 0 || this.tooltipModel.body.length == 0) {