Explorar el Código

improved height of graph in edit mode (adjusted to document height)

Torkel Odegaard hace 12 años
padre
commit
1540e95b97
Se han modificado 2 ficheros con 3 adiciones y 2 borrados
  1. 0 1
      src/app/panels/graphite/editor.html
  2. 3 1
      src/app/panels/graphite/module.js

+ 0 - 1
src/app/panels/graphite/editor.html

@@ -116,6 +116,5 @@
 </div>
 
 <div class="editor-row" style="margin-top: 20px" ng-show="editor.index == 1">
-  <button class="btn pull-right" ng-click="toggleFullscreen()">Close</button>
   <button class="btn btn-success pull-right" ng-click="add_target(panel.target)">Add target</button>
 </div>

+ 3 - 1
src/app/panels/graphite/module.js

@@ -371,9 +371,11 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
 
     $scope.enterFullscreenMode = function(options) {
       var docHeight = $(window).height();
+      var editHeight = Math.floor(docHeight * 0.3);
+      var fullscreenHeight = Math.floor(docHeight * 0.7);
       var oldTimeRange = $scope.range;
 
-      $scope.height = options.edit ? 200 : Math.floor(docHeight * 0.7);
+      $scope.height = options.edit ? editHeight : fullscreenHeight;
       $scope.editMode = options.edit;
 
       if (!$scope.fullscreen) {