Can't use other methods after using d3Force
Opened this issue · 1 comments
ykvou commented
Hi @vasturiano
Describe the bug
I can't use other methods after using d3Force.
To Reproduce
- Set d3Force
Graph.d3Force('link').distance(40)
- Set other method like linkDirectionalArrowRelPos
Graph.d3Force('link').distance(40).linkDirectionalArrowRelPos(1)
- Report an error
When the last method used is d3Force, it returns a force method
But other methods it returns a comp
vasturiano commented
@ykvou that is expected. Invoking d3Force like so: d3Force('link')
is in getter mode, returning the force plugin with the link
id.
The setter mode syntax would be adding a function after the id, like:
d3Force('myForce', () => { ... })
In this case, the method will behave like a regular setter and you can chain it.