You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am new using this library. I have a couple of questions:
I want to change the background color of a node when it is clicked. What is happening is when clicking the node, it changes its layout to the default config, and after the node loses the focus is when its color changed. Please see the code below. I also try the click event and got the same behavior. vm.networkEvents = { selectNode: function (selected) { var nodeID = selected['nodes']['0']; if (nodeID) { var clickedNode = nodes.get(nodeID); clickedNode.color = { background: 'yellow' } nodes.update(clickedNode); } } }
The other question is I am trying to draw some nodes inside a container node, something similar to the attached image. I create a node with shape: 'box', shapeProperties: { borderDashes: true } to draw the container, and the other nodes with shape: 'database'. How can I embedded/nested these database nodes in the container node?
Thank you!
The text was updated successfully, but these errors were encountered:
On 19 Apr 2017, at 22:22, Merlin ***@***.***> wrote:
Hello,
I am new using this library. I have a couple of questions:
I want to change the background color of a node when it is clicked. What is happening is when clicking the node, it changes its layout to the default config, and after the node loses the focus is when its color changed. Please see the code below. I also try the click event and got the same behavior.
vm.networkEvents = { selectNode: function (selected) { var nodeID = selected['nodes']['0']; if (nodeID) { var clickedNode = nodes.get(nodeID); clickedNode.color = { background: 'yellow' } nodes.update(clickedNode); } } }
The other question is I am trying to draw some nodes inside a container node, something similar to the attached image. I create a node with shape: 'box', shapeProperties: { borderDashes: true } to draw the container, and the other nodes with shape: 'database'. How can I embedded/nested these database nodes in the container node?
<https://cloud.githubusercontent.com/assets/1311742/25200092/5d3b6e68-250a-11e7-841e-d83ac22c1792.PNG>
Thank you!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#73>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA_kQxQ98t4wQ8RzV_jZXw8l66ufRhbRks5rxm0VgaJpZM4NCMfJ>.
Hello,
I am new using this library. I have a couple of questions:
vm.networkEvents = { selectNode: function (selected) { var nodeID = selected['nodes']['0']; if (nodeID) { var clickedNode = nodes.get(nodeID); clickedNode.color = { background: 'yellow' } nodes.update(clickedNode); } } }
The other question is I am trying to draw some nodes inside a container node, something similar to the attached image. I create a node with shape: 'box', shapeProperties: { borderDashes: true } to draw the container, and the other nodes with shape: 'database'. How can I embedded/nested these database nodes in the container node?
Thank you!
The text was updated successfully, but these errors were encountered: