Fork me on GitHub
#reagent
<
2018-05-29
>
folcon21:05:32

Anyone have any experience with rid3 or using d3 with reagent? I’m trying to work out how to update the elements in a graph with force-simulation while not breaking things in reagent.

gadfly36122:05:22

@folcon author of rid3 here, if no one else chimes in, I can probably provide you with a snippet sometime next week. Do you have a project or a code snippet where you have tried something that I can peak at?

folcon22:05:40

Hi @gadfly361, I didn’t expect you to be around 😃.

folcon22:05:54

Btw, love the library

gadfly36122:05:01

Oh no worries, after peaking at this I think I need to get more familiar with force simulations myself. I am hopeful I can find an example in vanilla d3 and convert it to cljs and rid3 sometime next week though. If you don't figure it out by then, I'll ping you, and if you do - let me know! Best of luck 🙂

folcon22:05:21

PS: here’s what I’ve been using since d3 updated to version 4 https://bl.ocks.org/mbostock/4062045

gadfly36122:05:04

@folcon fantastic, thank you!

folcon22:05:40

I’ll drop an issue in the github repo and keep it updated, if I find something I’ll mention it there =)…

gadfly36122:05:58

awesome, that works for me

gadfly36122:05:47

@folcon can you add your prepare-dataset function too

folcon22:05:36

sure

👍 4
folcon22:05:04

It’s going to look a little weird as my data comes from datomic, so I’m stringifying it so that I don’t lose the namespace for the keyword, but not a problem

gadfly36122:05:31

if it's inconvenient, no worries

folcon22:05:49

Already added

folcon22:05:57

In the issue I mean

gadfly36122:05:00

Sweet, thanks again!

folcon22:05:21

No problem, I’ll keep bumbling along and see what I discover 🙂

parrot 4
clj 4