Provide a way for plugins to override classes.

pull/1/head
David Schnur 13 years ago
parent edc2bbd992
commit 3b2d43bf65

@ -541,9 +541,16 @@ Licensed under the MIT license.
} }
function initPlugins() { function initPlugins() {
// References to key classes, allowing plugins to modify them
var classes = {
Canvas: Canvas
};
for (var i = 0; i < plugins.length; ++i) { for (var i = 0; i < plugins.length; ++i) {
var p = plugins[i]; var p = plugins[i];
p.init(plot); p.init(plot, classes);
if (p.options) if (p.options)
$.extend(true, options, p.options); $.extend(true, options, p.options);
} }

Loading…
Cancel
Save