<commit_before>function bottom(stateChanger, state,  event) {
    const
        deltaY = event.clientY - state.lastClickPosition.y,
        newHeight = parseInt(state.sizePool.height) + deltaY

    stateChanger({
        currentSize: {
            width: state.currentSize.width,
            height: newHeight + 'px'
        }
    })
}


function right(stateChanger, state,  event) {
    const
        deltaY = event.clientY - state.lastClickPosition.y,
        newHeight = parseInt(state.sizePool.height) + deltaY


    stateChanger({
        currentSize: {
            width: state.currentSize.width,
            height: newHeight + 'px'
        }
    })
}






export default (stateChanger, getState) => {
    return (event) => {

        const state = getState()

        switch(state.currentDirection) {
            case 'top':
                console.log('top')
                return;

            case 'bottom': return bottom( stateChanger, state, event )

            case 'left':
                console.log('left')
                return;

            case 'right':
                console.log('right')
                return;

            default: return
        }

    }
}<commit_msg>#developing<commit_after>function topBottom(stateChanger, state,  event, factor) {
    const
        deltaY    = (event.clientY - state.lastClickPosition.y) * factor,
        newHeight = parseInt(state.sizePool.height) + deltaY

    stateChanger({
        currentSize: {
            width: state.currentSize.width,
            height: newHeight + 'px'
        }
    })
}


function rightLeft(stateChanger, state,  event, factor) {
    const
        deltaX   = (event.clientX - state.lastClickPosition.x) * factor,
        newWidth = parseInt(state.sizePool.width) + deltaX

    stateChanger({
        currentSize: {
            width: newWidth + 'px',
            height: state.currentSize.height
        }
    })
}






export default (stateChanger, getState) => {
    return (event) => {

        const state = getState()

        switch(state.currentDirection) {
            case 'top': return topBottom( stateChanger, state, event, -1 );

            case 'bottom': return topBottom( stateChanger, state, event, 1 );

            case 'left': return rightLeft( stateChanger, state, event, -1 );

            case 'right': return rightLeft( stateChanger, state, event, 1 );

            default: return
        }

    }
}
{'fraction_non_alphanumeric': 0.10854312835328106, 'fraction_numerical': 0.0016508460586050352, 'mean_word_length': 1.851764705882353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6329162', 'n_tokens_mistral': 704, 'n_tokens_neox': 669, 'n_words': 151}