multiple-selection.js
function checkElementHitting(box1, box2) {
                    return (box2.beginX <= box1.beginX && box1.beginX <= box2.endX || box1.beginX <= box2.beginX && box2.beginX <= box1.endX) &&
                        (box2.beginY <= box1.beginY && box1.beginY <= box2.endY || box1.beginY <= box2.beginY && box2.beginY <= box1.endY);
                }
function checkElementHitting(box1, box2) {
                    return (box2.beginX <= box1.beginX && box1.beginX <= box2.endX || box1.beginX <= box2.beginX && box2.beginX <= box1.endX) &&
                        (box2.beginY <= box1.beginY && box1.beginY <= box2.endY || box1.beginY <= box2.beginY && box2.beginY <= box1.endY);
                }
function checkElementHitting ( box1 , box2 ) { return ( box2 . beginX <= box1 . beginX && box1 . beginX <= box2 . endX || box1 . beginX <= box2 . beginX && box2 . beginX <= box1 . endX ) && ( box2 . beginY <= box1 . beginY && box1 . beginY <= box2 . endY || box1 . beginY <= box2 . beginY && box2 . beginY <= box1 . endY ) ; }
Check that 2 boxes hitting
@param  {Object} box1
@param  {Object} box2
@return {Boolean} is hitting
Check that 2 boxes hitting