app/js/split-pane.js
// Handnles mouse drag while holding down on handle
Handnles mouse drag while holding down on handle
Handnles mouse drag while holding down on handle
function handleDrag(event) {
    var explorePanel = document.getElementById("explore_panel"),
        renderPanel = document.getElementById("render_panel"),
        handle = document.getElementById("split_handle");
    if (event.clientX < window.innerWidth - 10 && event.clientX > 200) {
        handle.style.left = 100 * (event.clientX / window.innerWidth) + '%';
        explorePanel.style.width = 100 * (event.clientX / window.innerWidth) + '%';
        renderPanel.style.width = 100 * ((window.innerWidth - event.clientX) / window.innerWidth) + '%';
        chromeTabs.layoutTabs();
    }
}
function handleDrag ( event ) { var explorePanel = document . getElementById ( "explore_panel" ) , renderPanel = document . getElementById ( "render_panel" ) , handle = document . getElementById ( "split_handle" ) ; if ( event . clientX < window . innerWidth - 10 && event . clientX > 200 ) { handle . style . left = 100 * ( event . clientX / window . innerWidth ) + '%' ; explorePanel . style . width = 100 * ( event . clientX / window . innerWidth ) + '%' ; renderPanel . style . width = 100 * ( ( window . innerWidth - event . clientX ) / window . innerWidth ) + '%' ; chromeTabs . layoutTabs ( ) ; } }
Handnles mouse drag while holding down on handle
Handnles mouse drag while holding down on handle
// Sets limits to sizes of panes // Resizes panes based on mouse position // More taxing to update tabs here (updates tab sizes)