function generateWheelsFromVector(wv, l, index) {
                var i = 0, j, obj, chInd,
                    w = [],
                    wtObjA = wa;

                if (l) { // if length is defined we need to generate that many wheels (even if they are empty)
                    for (j = 0; j < l; j++) {
                        w[j] = [{}];
                        //w[j] = {};
                        //w[j][labels[j]] = {}; // each wheel will have a label generated by the generateLabels method
                    }
                }
                while (i < wv.length) { // we generate the wheels until the length of the wheel vector
                    //w[i] = {};
                    //w[i][labels[i]] = getWheelFromObjA(wtObjA);
                    w[i] = [getWheelFromObjA(wtObjA, labels[i])];

                    j = 0;
                    chInd = undefined;

                    while (j < wtObjA.length && chInd === undefined) {
                        if (wtObjA[j].key == wv[i] && ((index !== undefined && i <= index) || index === undefined)) {
                            chInd = j;
                        }
                        j++;
                    }

                    if (chInd !== undefined && wtObjA[chInd].children) {
                        i++;
                        wtObjA = wtObjA[chInd].children;
                    } else if ((obj = getFirstValidItemObjOrInd(wtObjA)) && obj.children) {
                        i++;
                        wtObjA = obj.children;
                    } else {
                        return w;
                    }
                }
                return w;
            }
/**
             * Creates the wheel array from the vector provided
             * wv - wheel vector containing the values that should be selected on the wheels
             * l - the length of the wheel array
             */
Creates the wheel array from the vector provided
wv - wheel vector containing the values that should be selected on the wheels
l - the length of the wheel array
Creates the wheel array from the vector provided wv - wheel vector containing the values that should be selected on the wheels l - the length of the wheel array
function generateWheelsFromVector(wv, l, index) {
                var i = 0, j, obj, chInd,
                    w = [],
                    wtObjA = wa;
                if (l) { 
                    for (j = 0; j < l; j++) {
                        w[j] = [{}];
                    }
                }
                while (i < wv.length) { 
                    w[i] = [getWheelFromObjA(wtObjA, labels[i])];
                    j = 0;
                    chInd = undefined;
                    while (j < wtObjA.length && chInd === undefined) {
                        if (wtObjA[j].key == wv[i] && ((index !== undefined && i <= index) || index === undefined)) {
                            chInd = j;
                        }
                        j++;
                    }
                    if (chInd !== undefined && wtObjA[chInd].children) {
                        i++;
                        wtObjA = wtObjA[chInd].children;
                    } else if ((obj = getFirstValidItemObjOrInd(wtObjA)) && obj.children) {
                        i++;
                        wtObjA = obj.children;
                    } else {
                        return w;
                    }
                }
                return w;
            }
function generateWheelsFromVector ( wv , l , index ) { var i = 0 , j , obj , chInd , w = [ ] , wtObjA = wa ; if ( l ) { for ( j = 0 ; j < l ; j ++ ) { w [ j ] = [ { } ] ; } } while ( i < wv . length ) { w [ i ] = [ getWheelFromObjA ( wtObjA , labels [ i ] ) ] ; j = 0 ; chInd = undefined ; while ( j < wtObjA . length && chInd === undefined ) { if ( wtObjA [ j ] . key == wv [ i ] && ( ( index !== undefined && i <= index ) || index === undefined ) ) { chInd = j ; } j ++ ; } if ( chInd !== undefined && wtObjA [ chInd ] . children ) { i ++ ; wtObjA = wtObjA [ chInd ] . children ; } else if ( ( obj = getFirstValidItemObjOrInd ( wtObjA ) ) && obj . children ) { i ++ ; wtObjA = obj . children ; } else { return w ; } } return w ; }
Creates the wheel array from the vector provided
 wv - wheel vector containing the values that should be selected on the wheels
 l - the length of the wheel array
Creates the wheel array from the vector provided wv - wheel vector containing the values that should be selected on the wheels l - the length of the wheel array
// if length is defined we need to generate that many wheels (even if they are empty) //w[j] = {}; //w[j][labels[j]] = {}; // each wheel will have a label generated by the generateLabels method // we generate the wheels until the length of the wheel vector //w[i] = {}; //w[i][labels[i]] = getWheelFromObjA(wtObjA);