Skip to content

Commit

Permalink
feat(graph): sets fixed height for right side legend
Browse files Browse the repository at this point in the history
closes #1277
  • Loading branch information
bergquist committed Feb 8, 2016
1 parent edebdb1 commit 73bed38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions public/app/plugins/panel/graph/legend.js
Expand Up @@ -90,6 +90,14 @@ function (angular, _, $) {
}

function render() {
if (panel.legend.rightSide) {
var panelheight = scope.ctrl.height || scope.ctrl.panel.height || scope.ctrl.row.height;
$container.css("height", panelheight);
$container.toggleClass('graph-legend-fixed-height', true);
} else {
$container.css("height", "");
}

if (firstRender) {
elem.append($container);
$container.on('click', '.graph-legend-icon', openColorSelector);
Expand Down
5 changes: 3 additions & 2 deletions public/less/panel_graph.less
Expand Up @@ -60,7 +60,6 @@
}

.graph-legend-table {
display: table;
width: 100%;
margin: 0;

Expand Down Expand Up @@ -272,4 +271,6 @@
font-size: 12px;
}


.graph-legend-fixed-height {
overflow-y: scroll;
}

0 comments on commit 73bed38

Please sign in to comment.