Просмотр исходного кода

Merge branch 'graph_legend_height'

bergquist 10 лет назад
Родитель
Сommit
2f3d1ec2ef
2 измененных файлов с 11 добавлено и 2 удалено
  1. 8 0
      public/app/plugins/panel/graph/legend.js
  2. 3 2
      public/less/panel_graph.less

+ 8 - 0
public/app/plugins/panel/graph/legend.js

@@ -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);

+ 3 - 2
public/less/panel_graph.less

@@ -60,7 +60,6 @@
 }
 
 .graph-legend-table {
-  display: table;
   width: 100%;
   margin: 0;
 
@@ -272,4 +271,6 @@
   font-size: 12px;
 }
 
-
+.graph-legend-fixed-height {
+  overflow-y: scroll;
+}