Commit c79ab84f by Torkel Ödegaard

More fixes related to shared crosshair #880

parent d77448d8
...@@ -28,7 +28,6 @@ function (angular, $, kbn, moment, _, graphTooltip) { ...@@ -28,7 +28,6 @@ function (angular, $, kbn, moment, _, graphTooltip) {
} }
if(dashboard.sharedCrosshair) { if(dashboard.sharedCrosshair) {
console.log("setCrosshair");
var plot = elem.data().plot; var plot = elem.data().plot;
if (plot) { if (plot) {
plot.setCrosshair({ x: info.pos.x, y: info.pos.y }); plot.setCrosshair({ x: info.pos.x, y: info.pos.y });
...@@ -38,7 +37,9 @@ function (angular, $, kbn, moment, _, graphTooltip) { ...@@ -38,7 +37,9 @@ function (angular, $, kbn, moment, _, graphTooltip) {
scope.onAppEvent('clearCrosshair', function() { scope.onAppEvent('clearCrosshair', function() {
var plot = elem.data().plot; var plot = elem.data().plot;
plot.clearCrosshair(); if (plot) {
plot.clearCrosshair();
}
}); });
scope.$on('refresh', function() { scope.$on('refresh', function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment