浏览代码

fix(graph legend): minor correction to last commit

Torkel Ödegaard 9 年之前
父节点
当前提交
4377e95c99
共有 1 个文件被更改,包括 6 次插入1 次删除
  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);