Commit 49168263 by Patrick O'Carroll

small screen legend right also work like legend under in render + set scrollbar…

small screen legend right also work like legend under in render + set scrollbar to undefined in destroyScrollbar so it doesnt become disabled when toggeling between right and under
parent f2f70998
......@@ -111,6 +111,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
}
function render() {
let legendWidth = elem.width();
if (!ctrl.panel.legend.show) {
elem.empty();
firstRender = true;
......@@ -163,7 +164,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
}
// render first time for getting proper legend height
if (!panel.legend.rightSide) {
if (!panel.legend.rightSide || (panel.legend.rightSide && legendWidth !== 10)) {
renderLegendElement(tableHeaderElem);
elem.empty();
}
......@@ -265,6 +266,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
function destroyScrollbar() {
if (legendScrollbar) {
legendScrollbar.destroy();
legendScrollbar = undefined;
}
}
},
......
......@@ -11,19 +11,19 @@
flex: 0 1 10px;
max-height: 100%;
}
}
.graph-legend-series {
display: block;
padding-left: 0px;
}
.graph-legend-series {
display: block;
padding-left: 0px;
}
.graph-legend-table {
width: auto;
}
.graph-legend-table {
width: auto;
}
.graph-legend-table .graph-legend-series {
display: table-row;
.graph-legend-table .graph-legend-series {
display: table-row;
}
}
}
}
......
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