From 68df2de3088511e628ee7a4355bd238dcfecdac0 Mon Sep 17 00:00:00 2001 From: Sergiy Borodych Date: Wed, 20 Feb 2013 13:10:13 +0200 Subject: [PATCH] fix example (syntax error and indenting) --- PLUGINS.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/PLUGINS.md b/PLUGINS.md index 879c2b7..b5bf300 100644 --- a/PLUGINS.md +++ b/PLUGINS.md @@ -45,17 +45,18 @@ how much info to output: var debugLevel = 1; function checkDebugEnabled(plot, options) { - if (options.debug) { - debugLevel = options.debug; - plot.hooks.processDatapoints.push(alertSeries); + if (options.debug) { + debugLevel = options.debug; + plot.hooks.processDatapoints.push(alertSeries); + } } - } - function alertSeries(plot, series, datapoints) { - var msg = "series " + series.label; - if (debugLevel > 1) { - msg += " with " + series.data.length + " points"; - alert(msg); + function alertSeries(plot, series, datapoints) { + var msg = "series " + series.label; + if (debugLevel > 1) { + msg += " with " + series.data.length + " points"; + alert(msg); + } } plot.hooks.processOptions.push(checkDebugEnabled);