public/javascripts/yui/colorpicker/colorpicker.js
function(e, el, prop) {
            var command = this._getCommand(e),
                inc = (e.shiftKey) ? 10 : 1;
            switch (command) {
                case 6: // return, update the value
                    this._useFieldValue.apply(this, arguments);
                    break;
                            
                case 3: // up arrow, increment
                    this.set(prop, Math.min(this.get(prop)+inc, 255));
                    this._updateFormFields();
                    //Event.stopEvent(e);
                    break;
                case 4: // down arrow, decrement
                    this.set(prop, Math.max(this.get(prop)-inc, 0));
                    this._updateFormFields();
                    //Event.stopEvent(e);
                    break;

                default:
            }

        }
function(e, el, prop) {
            var command = this._getCommand(e),
                inc = (e.shiftKey) ? 10 : 1;
            switch (command) {
                case 6: // return, update the value
                    this._useFieldValue.apply(this, arguments);
                    break;
                            
                case 3: // up arrow, increment
                    this.set(prop, Math.min(this.get(prop)+inc, 255));
                    this._updateFormFields();
                    //Event.stopEvent(e);
                    break;
                case 4: // down arrow, decrement
                    this.set(prop, Math.max(this.get(prop)-inc, 0));
                    this._updateFormFields();
                    //Event.stopEvent(e);
                    break;

                default:
            }

        }
function ( e , el , prop ) { var command = this . _getCommand ( e ) , inc = ( e . shiftKey ) ? 10 : 1 ; switch ( command ) { case 6 : // return, update the value this . _useFieldValue . apply ( this , arguments ) ; break ; case 3 : // up arrow, increment this . set ( prop , Math . min ( this . get ( prop ) + inc , 255 ) ) ; this . _updateFormFields ( ) ; //Event.stopEvent(e); break ; case 4 : // down arrow, decrement this . set ( prop , Math . max ( this . get ( prop ) - inc , 0 ) ) ; this . _updateFormFields ( ) ; //Event.stopEvent(e); break ; default : } }
Handle keypress on one of the rgb or hsv fields.
@method _rgbFieldKeypress
@param e {Event} the keypress event
@param el {HTMLElement} the field
@param prop {string} the key to the linked property
@protected
Handle keypress on one of the rgb or hsv fields .