From 3b2d43bf65f773c838a89b1645d7c8e741a7908d Mon Sep 17 00:00:00 2001 From: David Schnur Date: Fri, 18 Jan 2013 16:45:28 -0500 Subject: [PATCH] Provide a way for plugins to override classes. --- jquery.flot.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jquery.flot.js b/jquery.flot.js index f9c5b7d..d6f3306 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -541,9 +541,16 @@ Licensed under the MIT license. } function initPlugins() { + + // References to key classes, allowing plugins to modify them + + var classes = { + Canvas: Canvas + }; + for (var i = 0; i < plugins.length; ++i) { var p = plugins[i]; - p.init(plot); + p.init(plot, classes); if (p.options) $.extend(true, options, p.options); }