samizdatco / arbor

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

arbor_path fails when script element has no path #52

Open emlyn opened 10 years ago

emlyn commented 10 years ago

If arbor.js is included without any explicit path, as in:

<script src="arbor.js"></script>

then the arbor_path() function incorrectly returns "/arbor.js", which doesn't work when it is not run from the root directory. A workaround is to instead include arbor with:

<script src="./arbor.js"></script>

but perhaps arbor_path() should default to the current directory instead of the root?