From 6ec9b9c7e131061a9249a6803c4f27a6125219e7 Mon Sep 17 00:00:00 2001 From: Serhii Mikhnytskyi Date: Tue, 5 Jan 2021 13:52:32 +0200 Subject: [PATCH] added - hide flot tooltip on chart destroying, prevent showing tooltip on flot hover, if edit mode is on. --- .../app/modules/home/components/widget/lib/flot-widget.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts index b7962a098d..b779c3bf43 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts @@ -718,6 +718,10 @@ export class TbFlot { public destroy() { this.cleanup(); + if (this.tooltip) { + this.tooltip.stop(true); + this.tooltip.hide(); + } if (this.plot) { this.plot.destroy(); this.plot = null; @@ -1170,7 +1174,7 @@ export class TbFlot { if (!this.plot) { return; } - if (!this.tooltipIndividual || item) { + if ((!this.tooltipIndividual || item) && !this.ctx.isEdit) { const multipleModeTooltip = !this.tooltipIndividual; if (multipleModeTooltip) { this.plot.unhighlight();