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

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

Torkel Odegaard пре 12 година
родитељ
комит
1540e95b97
2 измењених фајлова са 3 додато и 2 уклоњено
  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) {