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) { ...@@ -111,6 +111,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
} }
function render() { function render() {
let legendWidth = elem.width();
if (!ctrl.panel.legend.show) { if (!ctrl.panel.legend.show) {
elem.empty(); elem.empty();
firstRender = true; firstRender = true;
...@@ -163,7 +164,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) { ...@@ -163,7 +164,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
} }
// render first time for getting proper legend height // render first time for getting proper legend height
if (!panel.legend.rightSide) { if (!panel.legend.rightSide || (panel.legend.rightSide && legendWidth !== 10)) {
renderLegendElement(tableHeaderElem); renderLegendElement(tableHeaderElem);
elem.empty(); elem.empty();
} }
...@@ -265,6 +266,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) { ...@@ -265,6 +266,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
function destroyScrollbar() { function destroyScrollbar() {
if (legendScrollbar) { if (legendScrollbar) {
legendScrollbar.destroy(); legendScrollbar.destroy();
legendScrollbar = undefined;
} }
} }
}, },
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
flex: 0 1 10px; flex: 0 1 10px;
max-height: 100%; max-height: 100%;
} }
}
.graph-legend-series { .graph-legend-series {
display: block; display: block;
...@@ -26,6 +25,7 @@ ...@@ -26,6 +25,7 @@
display: table-row; display: table-row;
} }
} }
}
} }
.graph-panel__chart { .graph-panel__chart {
......
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