mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
panels: general property which makes panel scrollable
This commit is contained in:
@@ -21,7 +21,10 @@ var panelTemplate = `
|
||||
</div>
|
||||
|
||||
<div class="panel-content">
|
||||
<ng-transclude></ng-transclude>
|
||||
<div gemini-scrollbar ng-if="ctrl.scrollable">
|
||||
<ng-transclude></ng-transclude>
|
||||
</div>
|
||||
<ng-transclude ng-if="!ctrl.scrollable"></ng-transclude>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -62,6 +65,7 @@ module.directive('grafanaPanel', function($rootScope, $document) {
|
||||
scope: { ctrl: "=" },
|
||||
link: function(scope, elem) {
|
||||
var panelContainer = elem.find('.panel-container');
|
||||
var panelContent = elem.find('.panel-content');
|
||||
var cornerInfoElem = elem.find('.panel-info-corner');
|
||||
var ctrl = scope.ctrl;
|
||||
var infoDrop;
|
||||
@@ -84,6 +88,11 @@ module.directive('grafanaPanel', function($rootScope, $document) {
|
||||
ctrl.dashboard.setPanelFocus(0);
|
||||
}
|
||||
|
||||
function setPanelHeight() {
|
||||
panelContent.height(ctrl.height);
|
||||
}
|
||||
ctrl.$scope.setPanelHeight = setPanelHeight;
|
||||
|
||||
// set initial height
|
||||
if (!ctrl.containerHeight) {
|
||||
ctrl.calculatePanelHeight();
|
||||
|
||||
Reference in New Issue
Block a user