mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
improved height of graph in edit mode (adjusted to document height)
This commit is contained in:
parent
2066051455
commit
1540e95b97
@ -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>
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user