Commit 1540e95b by Torkel Odegaard

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

parent 20660514
...@@ -116,6 +116,5 @@ ...@@ -116,6 +116,5 @@
</div> </div>
<div class="editor-row" style="margin-top: 20px" ng-show="editor.index == 1"> <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> <button class="btn btn-success pull-right" ng-click="add_target(panel.target)">Add target</button>
</div> </div>
\ No newline at end of file
...@@ -371,9 +371,11 @@ function (angular, app, $, _, kbn, moment, timeSeries) { ...@@ -371,9 +371,11 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope.enterFullscreenMode = function(options) { $scope.enterFullscreenMode = function(options) {
var docHeight = $(window).height(); var docHeight = $(window).height();
var editHeight = Math.floor(docHeight * 0.3);
var fullscreenHeight = Math.floor(docHeight * 0.7);
var oldTimeRange = $scope.range; var oldTimeRange = $scope.range;
$scope.height = options.edit ? 200 : Math.floor(docHeight * 0.7); $scope.height = options.edit ? editHeight : fullscreenHeight;
$scope.editMode = options.edit; $scope.editMode = options.edit;
if (!$scope.fullscreen) { if (!$scope.fullscreen) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment