Browse Source
Merge pull request #3916 from hardshell/bug/flot-widget-tooltip-not-hiding
added - hide flot tooltip on chart destroying, prevent showing tooltip on flot hover, if edit mode is on.
pull/3941/head
Igor Kulikov
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts
|
|
@ -718,6 +718,10 @@ export class TbFlot { |
|
|
|
|
|
|
|
|
public destroy() { |
|
|
public destroy() { |
|
|
this.cleanup(); |
|
|
this.cleanup(); |
|
|
|
|
|
if (this.tooltip) { |
|
|
|
|
|
this.tooltip.stop(true); |
|
|
|
|
|
this.tooltip.hide(); |
|
|
|
|
|
} |
|
|
if (this.plot) { |
|
|
if (this.plot) { |
|
|
this.plot.destroy(); |
|
|
this.plot.destroy(); |
|
|
this.plot = null; |
|
|
this.plot = null; |
|
|
@ -1170,7 +1174,7 @@ export class TbFlot { |
|
|
if (!this.plot) { |
|
|
if (!this.plot) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (!this.tooltipIndividual || item) { |
|
|
if ((!this.tooltipIndividual || item) && !this.ctx.isEdit) { |
|
|
const multipleModeTooltip = !this.tooltipIndividual; |
|
|
const multipleModeTooltip = !this.tooltipIndividual; |
|
|
if (multipleModeTooltip) { |
|
|
if (multipleModeTooltip) { |
|
|
this.plot.unhighlight(); |
|
|
this.plot.unhighlight(); |
|
|
|