Browse Source

fix(graph legend): minor correction to last commit

Torkel Ödegaard 9 years ago
parent
commit
4377e95c99
1 changed files with 6 additions and 1 deletions
  1. 6 1
      public/app/plugins/panel/graph/legend.js

+ 6 - 1
public/app/plugins/panel/graph/legend.js

@@ -101,7 +101,12 @@ function (angular, _, $) {
         }
 
         function render() {
-          console.log('render legend');
+          if (!ctrl.panel.legend.show) {
+            elem.empty();
+            firstRender = true;
+            return;
+          }
+
           if (firstRender) {
             elem.append($container);
             $container.on('click', '.graph-legend-icon', openColorSelector);