Merge pull request #1738 from mtanda/suppress_redrawing_by_tooltip

Suppress redrawing when Shared Crosshair is disabled
This commit is contained in:
Torkel Ödegaard 2015-04-10 17:44:39 +02:00
commit 00cdb5e36a

View File

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