From 4377e95c99e06a94f7ef43bff38914a5f5c360d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 20 Mar 2016 11:21:06 +0100 Subject: [PATCH] fix(graph legend): minor correction to last commit --- public/app/plugins/panel/graph/legend.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/graph/legend.js b/public/app/plugins/panel/graph/legend.js index 1a4f53b0c0a..d6d1bdbf2dd 100644 --- a/public/app/plugins/panel/graph/legend.js +++ b/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);