toggleWhiteboard()

toggleWhiteboard(newState?: boolean)

Toggles the whiteboard visibility state.

If the whiteboard is currently opened, then it will be closed. And vice versa -> if the whiteboard is currently closed, then it will be opened. There is also an optional param to set a concrete target visibility state, but you may use closeWhiteboard() and openWhiteboard() to achieve similar functionality.

//This will toggle the whiteboard visibility state
sambaFrame.toggleWhiteboard();

//This will open the whiteboard, equivalent to sambaFrame.openWhiteboard();
sambaFrame.toggleWhiteboard(true); 

//This will close the whiteboard, equivalent to sambaFrame.closeWhiteboard();
sambaFrame.toggleWhiteboard(false);

Sample use case: You may have a button in your application to control the whiteboard visibility.

Last updated