samizdatco / arbor

a graph visualization library using web workers and jQuery
http://arborjs.org
2.66k stars 633 forks source link

Problems with the JS structure #43

Open thomasf1 opened 11 years ago

thomasf1 commented 11 years ago

I´ve tried to re-package the arbor tween and graphics js into but encountered a number of issues... First, the web worker held me up and the overall packaging of the JS isn´t as simple as it could me... It seems quite fickle when minifying code as well...

I´ve actually tried to port it over to coffeescript as the coffeescript "class" seems a perfect match for the structure and would add more clarity to the code (rather than handling this and that manually)...

Do you think it´s a good match?

PS: Sorry for using the Issues to communicate...

christianvoigt commented 11 years ago

I had the same problem. The web worker looks for a script tag that loads arbor.js in the html file. I want to put all the libraries I am using and my own code into one minimized file. The only simple way to do this with arbor is to change the string arbor is looking for, so that it finds my custom file. But then the web worker would load a lot of unnecessary code. So it would probably be best if the web worker would still load a separate arbor.js file. It seems to me the easiest way to accomplish this would be, to make it possible to initialize arbor with a path-to-arbor-js parameter.