Selaa lähdekoodia

Merge pull request #1738 from mtanda/suppress_redrawing_by_tooltip

Suppress redrawing when Shared Crosshair is disabled
Torkel Ödegaard 10 vuotta sitten
vanhempi
commit
00cdb5e36a
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      public/app/panels/graph/graph.tooltip.js

+ 5 - 2
public/app/panels/graph/graph.tooltip.js

@@ -82,14 +82,17 @@ function ($) {
     };
 
     elem.mouseleave(function () {
-      if (scope.panel.tooltip.shared || dashboard.sharedCrosshair) {
+      if (scope.panel.tooltip.shared) {
         var plot = elem.data().plot;
         if (plot) {
           $tooltip.detach();
           plot.unhighlight();
-          scope.appEvent('clearCrosshair');
         }
       }
+
+      if (dashboard.sharedCrosshair) {
+        scope.appEvent('clearCrosshair');
+      }
     });
 
     elem.bind("plothover", function (event, pos, item) {