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

This commit is contained in:
Torkel Odegaard 2014-01-06 15:02:41 +01:00
parent 2066051455
commit 1540e95b97
2 changed files with 3 additions and 2 deletions

View File

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

View File

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