Closed marfoldi closed 8 years ago
Directory structure:
Are you using any sort of javascript bundler? The logic to decide whether or not to attach the plugin to the window as a global is as follows (to make it work with browserify, require.js, and vanilla script tags):
// export as a Node module, an AMD module or a global browser variable
if (typeof module !== 'undefined') {
module.exports = d3_multiaxis_zoom;
} else if (typeof define === 'function' && define.amd) {
define(function() {
return d3_multiaxis_zoom;
});
} else {
window.d3_multiaxis_zoom = d3_multiaxis_zoom;
}
I've just cloned your repo and added a html file (code above). So is it necessary to use a bundler e.g. require.js to make it work?
@marfoldi it looks like the standalone d3-multiaxis-zoom.js
file was incorrectly bundled last time. I've updated it and tested with the above html file
Thank you!
Hi,
I'm trying to load the plugin as it described in the readme without success. I get "Uncaught ReferenceError: d3_multiaxis_zoom is not defined" runtime error.