nglview.js_utils

Module contents

nglview.utils.js_utils.clean_empty_output_area(*, command='\nvar output_area = $(".output_area");\n\nfor (var i=0; i < output_area.length; i++){\n if (!output_area[i].innerText){\n output_area[i].remove();\n }\n}\n')
nglview.utils.js_utils.clean_error_output(*, command="\nvar cells = Jupyter.notebook.get_cells();\n\nfor (var i = 0; i < cells.length; i++){\n var cell = cells[i];\n if (cell.output_area.outputs.length > 0) {\n var out = cell.output_area.outputs[0];\n if (out.output_type == 'error') {\n cell.clear_output();\n }\n }\n}\n")
nglview.utils.js_utils.execute(command)[source]
nglview.utils.js_utils.hide_toolbar()[source]
nglview.utils.js_utils.init_funcs()[source]

print

nglview.utils.js_utils.launch_qtconsole(*, command="\nJupyter.notebook.kernel.execute('%qtconsole')\n")
nglview.utils.js_utils.ngl_demo(width=400, height=400)[source]

make a viewport, create stage object and populate NGL namespace

nglview.utils.js_utils.run(command)[source]
nglview.utils.js_utils.show_toolbar()[source]