Commit d5e7019cfa20af00aaadc852a8b51c362fd332d5

Authored by Igor Kulikov
Committed by GitHub
2 parents 4aa55bcc 6ec9b9c7

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.
@@ -718,6 +718,10 @@ export class TbFlot { @@ -718,6 +718,10 @@ export class TbFlot {
718 718
719 public destroy() { 719 public destroy() {
720 this.cleanup(); 720 this.cleanup();
  721 + if (this.tooltip) {
  722 + this.tooltip.stop(true);
  723 + this.tooltip.hide();
  724 + }
721 if (this.plot) { 725 if (this.plot) {
722 this.plot.destroy(); 726 this.plot.destroy();
723 this.plot = null; 727 this.plot = null;
@@ -1170,7 +1174,7 @@ export class TbFlot { @@ -1170,7 +1174,7 @@ export class TbFlot {
1170 if (!this.plot) { 1174 if (!this.plot) {
1171 return; 1175 return;
1172 } 1176 }
1173 - if (!this.tooltipIndividual || item) { 1177 + if ((!this.tooltipIndividual || item) && !this.ctx.isEdit) {
1174 const multipleModeTooltip = !this.tooltipIndividual; 1178 const multipleModeTooltip = !this.tooltipIndividual;
1175 if (multipleModeTooltip) { 1179 if (multipleModeTooltip) {
1176 this.plot.unhighlight(); 1180 this.plot.unhighlight();