static/src/whiteboard-addon.js
/**
 * Toggle between the code editor
 * and the whiteboard
 */
Toggle between the code editor
and the whiteboard
Toggle between the code editor and the whiteboard
function toggleEditorAndBoard(){
    toggle.state = !toggle.state;
    if (!toggle.state){
        toggle.classList.add('toggle-off');
        wb.toolbar.element.classList.remove('hide');
        wb.toolbar.color_button.classList.remove('hide');
        wb.unfreeze();
    }else{
        toggle.classList.remove('toggle-off');
        wb.toolbar.element.classList.add('hide');
        wb.toolbar.color_button.classList.add('hide');
        wb.freeze();
    }
}
function toggleEditorAndBoard ( ) { toggle . state = ! toggle . state ; if ( ! toggle . state ) { toggle . classList . add ( 'toggle-off' ) ; wb . toolbar . element . classList . remove ( 'hide' ) ; wb . toolbar . color_button . classList . remove ( 'hide' ) ; wb . unfreeze ( ) ; } else { toggle . classList . remove ( 'toggle-off' ) ; wb . toolbar . element . classList . add ( 'hide' ) ; wb . toolbar . color_button . classList . add ( 'hide' ) ; wb . freeze ( ) ; } }
Toggle between the code editor
 and the whiteboard
Toggle between the code editor and the whiteboard
// Toggle state