From 37893493f50285714f3b2a69fdf0c2f6cd318210 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 13 Aug 2017 10:28:59 -0600 Subject: buildTabbedChartUi(): Simplify needlessly complex code --- jarmon/jarmon.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js index e3b9768..7be4f16 100644 --- a/jarmon/jarmon.js +++ b/jarmon/jarmon.js @@ -1227,18 +1227,12 @@ jarmon.buildTabbedChartUi = function ($chartTemplate, chartRecipes, var cc = new jarmon.ChartCoordinator($controlPanelTemplate, charts); // Update charts when tab is clicked - ti.$tpl.find(".css-tabs:first").bind( - 'click', - {'cc': cc}, + ti.$tpl.find(".css-tabs:first").bind('click', function(e) { - var cc = e.data.cc; // XXX: Hack to give the tab just enough time to become visible // so that Flot can calculate chart dimensions. window.clearTimeout(cc.t); - cc.t = window.setTimeout( - function() { - cc.update(); - }, 100); + cc.t = window.setTimeout(cc.update(), 100); } ); -- cgit v1.2.3