function keepAdjustingArea(left, top, horizontally, vertically) {
        if (horizontally == null) {
            horizontally = true;
        }
        if (vertically == null) {
            vertically = true;
        }

        $pickerOverlay.on({
            'mousemove.malakh': function (evt) {
                var mousePosition = getMousePosition(evt);
                var cursorType = '';

                // Vertical/horizontal blocking is active when we change
                // rectangle size by dragging by its edge.
                if (vertically) {
                    pickerAreaMode.toBottom = mousePosition.y >= top;
                    if (pickerAreaMode.toBottom) {
                        $pickerArea.css({
                            top: top,
                            height: mousePosition.y - top,
                        });
                        cursorType += 's';
                    } else {
                        $pickerArea.css({
                            top: mousePosition.y,
                            height: top - mousePosition.y,
                        });
                        cursorType += 'n';
                    }
                }

                if (horizontally) {
                    pickerAreaMode.toRight = mousePosition.x >= left;
                    if (pickerAreaMode.toRight) {
                        $pickerArea.css({
                            left: left,
                            width: mousePosition.x - left,
                        });
                        cursorType += 'e';
                    } else {
                        $pickerArea.css({
                            left: mousePosition.x,
                            width: left - mousePosition.x,
                        });
                        cursorType += 'w';
                    }
                }

                cursorType += '-resize';
                $pickerOverlay.css('cursor', cursorType);
            },
        });
    }
/**
     * Dynamically changes picker's rectangle during it's creation
     * or dragging by its edge or corner.
     *
     * @param {number} left Position of the left edge of the rectangle when we move its right side.
     *                      Changes to mean position of the right side when mouse moves far to the left.
     * @param {number} top Like above but with 'left' changed to 'top' and 'right' to 'bottom'.
     * @param {boolean} [horizontally] Do we allow horizontal resizing? Can be blocked if we drag by the edge.
     * @param {boolean} [vertically] Do we allow vertical resizing?
     * @private
     */
Dynamically changes picker's rectangle during it's creation
or dragging by its edge or corner.

@param {number} left Position of the left edge of the rectangle when we move its right side.
Changes to mean position of the right side when mouse moves far to the left.
Dynamically changes picker ' s rectangle during it ' s creation or dragging by its edge or corner . @param { number } left Position of the left edge of the rectangle when we move its right side . Changes to mean position of the right side when mouse moves far to the left .
function keepAdjustingArea(left, top, horizontally, vertically) {
        if (horizontally == null) {
            horizontally = true;
        }
        if (vertically == null) {
            vertically = true;
        }
        $pickerOverlay.on({
            'mousemove.malakh': function (evt) {
                var mousePosition = getMousePosition(evt);
                var cursorType = '';
                if (vertically) {
                    pickerAreaMode.toBottom = mousePosition.y >= top;
                    if (pickerAreaMode.toBottom) {
                        $pickerArea.css({
                            top: top,
                            height: mousePosition.y - top,
                        });
                        cursorType += 's';
                    } else {
                        $pickerArea.css({
                            top: mousePosition.y,
                            height: top - mousePosition.y,
                        });
                        cursorType += 'n';
                    }
                }
                if (horizontally) {
                    pickerAreaMode.toRight = mousePosition.x >= left;
                    if (pickerAreaMode.toRight) {
                        $pickerArea.css({
                            left: left,
                            width: mousePosition.x - left,
                        });
                        cursorType += 'e';
                    } else {
                        $pickerArea.css({
                            left: mousePosition.x,
                            width: left - mousePosition.x,
                        });
                        cursorType += 'w';
                    }
                }
                cursorType += '-resize';
                $pickerOverlay.css('cursor', cursorType);
            },
        });
    }
function keepAdjustingArea ( left , top , horizontally , vertically ) { if ( horizontally == null ) { horizontally = true ; } if ( vertically == null ) { vertically = true ; } $pickerOverlay . on ( { 'mousemove.malakh' : function ( evt ) { var mousePosition = getMousePosition ( evt ) ; var cursorType = '' ; if ( vertically ) { pickerAreaMode . toBottom = mousePosition . y >= top ; if ( pickerAreaMode . toBottom ) { $pickerArea . css ( { top : top , height : mousePosition . y - top , } ) ; cursorType += 's' ; } else { $pickerArea . css ( { top : mousePosition . y , height : top - mousePosition . y , } ) ; cursorType += 'n' ; } } if ( horizontally ) { pickerAreaMode . toRight = mousePosition . x >= left ; if ( pickerAreaMode . toRight ) { $pickerArea . css ( { left : left , width : mousePosition . x - left , } ) ; cursorType += 'e' ; } else { $pickerArea . css ( { left : mousePosition . x , width : left - mousePosition . x , } ) ; cursorType += 'w' ; } } cursorType += '-resize' ; $pickerOverlay . css ( 'cursor' , cursorType ) ; } , } ) ; }
Dynamically changes picker's rectangle during it's creation
 or dragging by its edge or corner.
Dynamically changes picker ' s rectangle during it ' s creation or dragging by its edge or corner .
// Vertical/horizontal blocking is active when we change // rectangle size by dragging by its edge.