if ( bounds.x + bounds.width > screenArea.width + screenArea.x ) {

        bounds.x = screenArea.width - bounds.width

    }