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

pull/7/head
Torkel Odegaard 12 years ago
parent 2066051455
commit 1540e95b97
  1. 1
      src/app/panels/graphite/editor.html
  2. 4
      src/app/panels/graphite/module.js

@ -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>

@ -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) {

Loading…
Cancel
Save