function moveHandles ( upward, proposal, locations, handleNumbers ) {

            var proposals = locations.slice();

            var b = [!upward, upward];
            var f = [upward, !upward];

            // Copy handleNumbers so we don't change the dataset
            handleNumbers = handleNumbers.slice();

            // Check to see which handle is 'leading'.
            // If that one can't move the second can't either.
            if ( upward ) {
                handleNumbers.reverse();
            }

            // Step 1: get the maximum percentage that any of the handles can move
            if ( handleNumbers.length > 1 ) {

                handleNumbers.forEach(function(handleNumber, o) {

                    var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o]);

                    // Stop if one of the handles can't move.
                    if ( to === false ) {
                        proposal = 0;
                    } else {
                        proposal = to - proposals[handleNumber];
                        proposals[handleNumber] = to;
                    }
                });
            }

            // If using one handle, check backward AND forward
            else {
                b = f = [true];
            }

            var state = false;

            // Step 2: Try to set the handles with the found percentage
            handleNumbers.forEach(function(handleNumber, o) {
                state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
            });

            // Step 3: If a handle moved, fire events
            if ( state ) {
                handleNumbers.forEach(function(handleNumber){
                    fireEvent('update', handleNumber);
                    fireEvent('slide', handleNumber);
                });
            }
        }
function moveHandles ( upward, proposal, locations, handleNumbers ) {

            var proposals = locations.slice();

            var b = [!upward, upward];
            var f = [upward, !upward];

            // Copy handleNumbers so we don't change the dataset
            handleNumbers = handleNumbers.slice();

            // Check to see which handle is 'leading'.
            // If that one can't move the second can't either.
            if ( upward ) {
                handleNumbers.reverse();
            }

            // Step 1: get the maximum percentage that any of the handles can move
            if ( handleNumbers.length > 1 ) {

                handleNumbers.forEach(function(handleNumber, o) {

                    var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o]);

                    // Stop if one of the handles can't move.
                    if ( to === false ) {
                        proposal = 0;
                    } else {
                        proposal = to - proposals[handleNumber];
                        proposals[handleNumber] = to;
                    }
                });
            }

            // If using one handle, check backward AND forward
            else {
                b = f = [true];
            }

            var state = false;

            // Step 2: Try to set the handles with the found percentage
            handleNumbers.forEach(function(handleNumber, o) {
                state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
            });

            // Step 3: If a handle moved, fire events
            if ( state ) {
                handleNumbers.forEach(function(handleNumber){
                    fireEvent('update', handleNumber);
                    fireEvent('slide', handleNumber);
                });
            }
        }
function moveHandles ( upward , proposal , locations , handleNumbers ) { var proposals = locations . slice ( ) ; var b = [ ! upward , upward ] ; var f = [ upward , ! upward ] ; // Copy handleNumbers so we don't change the dataset handleNumbers = handleNumbers . slice ( ) ; // Check to see which handle is 'leading'. // If that one can't move the second can't either. if ( upward ) { handleNumbers . reverse ( ) ; } // Step 1: get the maximum percentage that any of the handles can move if ( handleNumbers . length > 1 ) { handleNumbers . forEach ( function ( handleNumber , o ) { var to = checkHandlePosition ( proposals , handleNumber , proposals [ handleNumber ] + proposal , b [ o ] , f [ o ] ) ; // Stop if one of the handles can't move. if ( to === false ) { proposal = 0 ; } else { proposal = to - proposals [ handleNumber ] ; proposals [ handleNumber ] = to ; } } ) ; } // If using one handle, check backward AND forward else { b = f = [ true ] ; } var state = false ; // Step 2: Try to set the handles with the found percentage handleNumbers . forEach ( function ( handleNumber , o ) { state = setHandle ( handleNumber , locations [ handleNumber ] + proposal , b [ o ] , f [ o ] ) || state ; } ) ; // Step 3: If a handle moved, fire events if ( state ) { handleNumbers . forEach ( function ( handleNumber ) { fireEvent ( 'update' , handleNumber ) ; fireEvent ( 'slide' , handleNumber ) ; } ) ; } }
Moves handle(s) by a percentage (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])
Moves handle ( s ) by a percentage ( bool % to move [ % where handle started ... ] [ index in scope_Handles ... ] )
Move handles in the dataset