|
|
@@ -84,7 +84,7 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv) {
|
|
|
let thisPanelEvent = event.panel.id === ctrl.panel.id;
|
|
|
|
|
|
// Select time for new annotation
|
|
|
- let createAnnotation = ctrl.inAddAnnotationMode || event.pos.ctrlKey || event.pos.metaKey;
|
|
|
+ let createAnnotation = event.pos.ctrlKey || event.pos.metaKey;
|
|
|
if (createAnnotation && thisPanelEvent) {
|
|
|
let timeRange = {
|
|
|
from: event.pos.x,
|
|
|
@@ -92,7 +92,6 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv) {
|
|
|
};
|
|
|
|
|
|
ctrl.showAddAnnotationModal(timeRange);
|
|
|
- ctrl.inAddAnnotationMode = false;
|
|
|
}
|
|
|
}, scope);
|
|
|
|
|
|
@@ -656,12 +655,11 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv) {
|
|
|
}
|
|
|
|
|
|
elem.bind("plotselected", function (event, ranges) {
|
|
|
- if (ctrl.inAddAnnotationMode || ranges.ctrlKey || ranges.metaKey) {
|
|
|
+ if (ranges.ctrlKey || ranges.metaKey) {
|
|
|
// Create new annotation from time range
|
|
|
let timeRange = ranges.xaxis;
|
|
|
ctrl.showAddAnnotationModal(timeRange);
|
|
|
plot.clearSelection();
|
|
|
- ctrl.inAddAnnotationMode = false;
|
|
|
} else {
|
|
|
scope.$apply(function() {
|
|
|
timeSrv.setTime({
|