Currently I can toggle a fullscreen of visjs network graph. However, I want to add some custom buttons. Currently I haven't find a way to embed the button inside the visjs graph. So when I toggle the fullscreen of visjs network graph, the buttons are gone. May I know that is there a way I can append the buttons to a certain position when fullscreen is triggered? Thank you so much layout of the page
Ok, if I got what you need right you want to make the network go fullscreen and keep the button on the left and add custom buttons when fullscreen.
To do it, one solution I think it might work is to wrap your network and your buttons in a single div
. Then, instead of making only the network div
fullscreen, you would make the whole container go fullscreen. To toggle which buttons are visible, you can listen for the Full Screen Events and play around with the display
property in each button.
Check out this fiddle: http://jsfiddle.net/e7Lg99n9/
Here, I have a button to make it go full screen and then I have a button that is only showed when in full screen mode.
Is that enough for you?
Regards