samizdatco / arbor

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

Bug in ParticleSystem object constructor #25

Open kyzyx opened 12 years ago

kyzyx commented 12 years ago

In physics/system.js, the object initializer (i.e. ParticleSystem({repulsion:1000, stiffness:80)) does not work. Changing lines 20-21 from

if (typeof stiffness=='object'){
    var _p = stiffness

to

if (typeof repulsion=='object'){
    var _p = repulsion

fixes the problem