Hide or show node element with button onclick

Would you expect clicking on those buttons in other nodes to also affect all similar nodes?

I am expecting by clicking a regular button outside the presented nodes, it will affect all the nodes.

Update

I think it is impossible for the button to expand/collapse the node if it is placed outside of the node and it is so odd to have button on a node affects the other nodes. So, I use javascript to append a parameter with its value true or false to the web url and fetch the parameter value to the GraphObject.visible. Note that the page is reloaded at each time the button is clicked.