function fillImpliedPositions(colorStops) {
		var from = 0;
		
		_.each(colorStops, function(cs, i) {
			// make sure that first and last positions are defined
			if (!i)
				return cs.position = cs.position || 0;
			
			if (i == colorStops.length - 1 && !('position' in cs))
				cs.position = 1;
			
			if ('position' in cs) {
				var start = colorStops[from].position || 0;
				var step = (cs.position - start) / (i - from);
				_.each(colorStops.slice(from, i), function(cs2, j) {
					cs2.position = start + step * j;
				});
				
				from = i;
			}
		});
	}
function fillImpliedPositions(colorStops) {
		var from = 0;
		
		_.each(colorStops, function(cs, i) {
			
			if (!i)
				return cs.position = cs.position || 0;
			
			if (i == colorStops.length - 1 && !('position' in cs))
				cs.position = 1;
			
			if ('position' in cs) {
				var start = colorStops[from].position || 0;
				var step = (cs.position - start) / (i - from);
				_.each(colorStops.slice(from, i), function(cs2, j) {
					cs2.position = start + step * j;
				});
				
				from = i;
			}
		});
	}
function fillImpliedPositions ( colorStops ) { var from = 0 ; _ . each ( colorStops , function ( cs , i ) { // make sure that first and last positions are defined if ( ! i ) return cs . position = cs . position || 0 ; if ( i == colorStops . length - 1 && ! ( 'position' in cs ) ) cs . position = 1 ; if ( 'position' in cs ) { var start = colorStops [ from ] . position || 0 ; var step = ( cs . position - start ) / ( i - from ) ; _ . each ( colorStops . slice ( from , i ) , function ( cs2 , j ) { cs2 . position = start + step * j ; } ) ; from = i ; } } ) ; }
Fills-out implied positions in color-stops. This function is useful for
old Webkit gradient definitions
Fills - out implied positions in color - stops . This function is useful for old Webkit gradient definitions