mirror of
https://github.com/grafana/grafana.git
synced 2025-01-08 23:23:45 -06:00
scrollbar: fix graph legend height
This commit is contained in:
parent
b4ef55f5d0
commit
fa43782299
@ -238,10 +238,10 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
|
||||
tbodyElem.append(tableHeaderElem);
|
||||
tbodyElem.append(seriesElements);
|
||||
elem.append(tbodyElem);
|
||||
tbodyElem.wrap('<div class="graph-legend-content"></div>');
|
||||
tbodyElem.wrap('<div class="graph-legend-scroll"></div>');
|
||||
} else {
|
||||
elem.append('<div class="graph-legend-content"></div>');
|
||||
elem.find('.graph-legend-content').append(seriesElements);
|
||||
elem.append('<div class="graph-legend-scroll"></div>');
|
||||
elem.find('.graph-legend-scroll').append(seriesElements);
|
||||
}
|
||||
|
||||
if (!panel.legend.rightSide || (panel.legend.rightSide && legendWidth !== legendRightDefaultWidth)) {
|
||||
@ -261,7 +261,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
|
||||
`;
|
||||
|
||||
let scrollRoot = elem;
|
||||
let scroller = elem.find('.graph-legend-content');
|
||||
let scroller = elem.find('.graph-legend-scroll');
|
||||
|
||||
// clear existing scroll bar track to prevent duplication
|
||||
scrollRoot.find('.baron__track').remove();
|
||||
|
@ -3,7 +3,9 @@ var template = `
|
||||
<div class="graph-panel__chart" grafana-graph ng-dblclick="ctrl.zoomOut()">
|
||||
</div>
|
||||
|
||||
<div class="graph-legend" graph-legend></div>
|
||||
<div class="graph-legend">
|
||||
<div class="graph-legend-content" graph-legend></div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
@ -49,6 +49,7 @@
|
||||
}
|
||||
|
||||
.graph-legend {
|
||||
display: flex;
|
||||
flex: 0 1 auto;
|
||||
max-height: 30%;
|
||||
margin: 0;
|
||||
@ -56,7 +57,8 @@
|
||||
padding-top: 6px;
|
||||
position: relative;
|
||||
|
||||
height: 100%;
|
||||
// fix for Firefox (white stripe on the right of scrollbar)
|
||||
width: 99%;
|
||||
|
||||
.popover-content {
|
||||
padding: 0;
|
||||
@ -67,6 +69,10 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.graph-legend-scroll {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.graph-legend-icon {
|
||||
position: relative;
|
||||
padding-right: 4px;
|
||||
|
@ -192,12 +192,12 @@
|
||||
|
||||
// Width needs to be set to prevent content width issues
|
||||
// Set to 99% instead of 100% for fixing Firefox issue (white stripe on the right of scrollbar)
|
||||
min-width: 99%;
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
// Fix for side menu on mobile devices
|
||||
.main-view.baron {
|
||||
min-width: unset;
|
||||
width: unset;
|
||||
}
|
||||
|
||||
.baron__clipper {
|
||||
|
Loading…
Reference in New Issue
Block a user