Repository navigation
|
Hi, I just started with van.js. so first of all HUGE THANK YOU for this amazing project!!! It looks like everything I need for my current work. |
Replies: 6 comments 5 replies
|
Hi @kosirm, Thanks for reaching out! For your purpose, you might want to take a look at VanX (the official VanJS extension), which has the functionality of adding reactivity to existing JavaScript classes. To bind arrays to DOM nodes, you can take a look at vanX.list. Hope it helps :-) |
|
There is "Caveat: Once an object is turned reactive with vanX.reactive, you shouldn't access the original object anymore." If I understand it well... I'm accessing/changing these objects all the time (not only from van.js), but if these objects are vanX.reactive objects I can access them directly as vanX.reactive objects and then this should not be a problem, I guess. |
|
I'm using vis.js network visualization library. Now I'm instatiating nodes and edges like this: and I instantiate network with: But that's ok, because what I want to be reactive is nodes, edges and options: And then make network with reative objects: Is this ok with van.js? Thanks for any reply! |
|
So sorry to report this, but van.js does not work with vis.js network... as far as I can see. It returns ERROR: |
|
Very good news... during my work (I work as a bricklayer) I was thinking about this. Vis Network is using another library for storing nodes and edges (vis dataset), and this needs to be done via json, but for options there is no problem, works fine. And exactly options are the thing which I mostly want to be reactive... So I'm happy camper again 😄 🚐 |
|
Only problem which I encountered when using vanX is that chrome is trowing warning/recommendation: I put options in vanX: |
Hi @kosirm,
Thanks for reaching out!
For your purpose, you might want to take a look at VanX (the official VanJS extension), which has the functionality of adding reactivity to existing JavaScript classes. To bind arrays to DOM nodes, you can take a look at vanX.list.
Hope it helps :-)