Преглед изворни кода

Merge pull request #3581 from bergquist/zoomout_on_doubleclick

Zoom out on double click in graphs
Carl Bergquist пре 10 година
родитељ
комит
3dc3d363fd

+ 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([]);