Преглед на файлове

Merge pull request #3581 from bergquist/zoomout_on_doubleclick

Zoom out on double click in graphs
Carl Bergquist преди 10 години
родител
ревизия
3dc3d363fd
променени са 2 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 1 1
      public/app/plugins/panels/graph/module.html
  2. 4 0
      public/app/plugins/panels/graph/module.js

+ 1 - 1
public/app/plugins/panels/graph/module.html

@@ -10,7 +10,7 @@
 				<span class="small" ng-show="datapointsOutside">Datapoints outside time range <tip>Can be caused by timezone mismatch between browser and graphite server</tip></span>
 			</div>
 
-			<div grafana-graph class="histogram-chart">
+			<div grafana-graph class="histogram-chart" ng-dblclick="zoomOut()">
 			</div>
 
 		</div>

+ 4 - 0
public/app/plugins/panels/graph/module.js

@@ -138,6 +138,10 @@ function (angular, _, moment, kbn, TimeSeries, PanelMeta) {
         });
     };
 
+    $scope.zoomOut = function(evt) {
+      $scope.appEvent('zoom-out', evt);
+    };
+
     $scope.loadSnapshot = function(snapshotData) {
       panelHelper.updateTimeRange($scope);
       $scope.annotationsPromise = $q.when([]);