HumbleSoftware / Flotr2

Graphs and Charts for Canvas in JavaScript.
http://www.humblesoftware.com/flotr2/
MIT License
2.45k stars 528 forks source link

flotr2.js from the repo isn't usable in an app with RequireJS loaded #263

Open evil-shrike opened 10 years ago

evil-shrike commented 10 years ago

I get https://github.com/HumbleSoftware/Flotr2/blob/master/flotr2.js and import it in my app as AMD module. Loading of flotr2 fails with the following error:

Uncaught ReferenceError: bean is not defined flotr2.js:1359 (anonymous function) flotr2.js:1359 (anonymous function) flotr2.js:1596

It seems that bundled 'bean' lib support AMD and checks for presence of define function. And if it exists then bean do not export itself globaly. But flotr2 totally ignores this logic and expect to find bean in global context.

jochenberger commented 10 years ago

249 should be able to fix that.

jochenberger commented 10 years ago

I created a branch and a pull request in #273 if you want to have a look.