example/public/ueditor/third-party/highcharts/highcharts.src.js
function (elem, fromD, toD) {
		fromD = fromD || '';
		var shift = elem.shift,
			bezier = fromD.indexOf('C') > -1,
			numParams = bezier ? 7 : 3,
			endLength,
			slice,
			i,
			start = fromD.split(' '),
			end = [].concat(toD), // copy
			startBaseLine,
			endBaseLine,
			sixify = function (arr) { // in splines make move points have six parameters like bezier curves
				i = arr.length;
				while (i--) {
					if (arr[i] === M) {
						arr.splice(i + 1, 0, arr[i + 1], arr[i + 2], arr[i + 1], arr[i + 2]);
					}
				}
			};

		if (bezier) {
			sixify(start);
			sixify(end);
		}

		// pull out the base lines before padding
		if (elem.isArea) {
			startBaseLine = start.splice(start.length - 6, 6);
			endBaseLine = end.splice(end.length - 6, 6);
		}

		// if shifting points, prepend a dummy point to the end path
		if (shift <= end.length / numParams && start.length === end.length) {
			while (shift--) {
				end = [].concat(end).splice(0, numParams).concat(end);
			}
		}
		elem.shift = 0; // reset for following animations

		// copy and append last point until the length matches the end length
		if (start.length) {
			endLength = end.length;
			while (start.length < endLength) {

				//bezier && sixify(start);
				slice = [].concat(start).splice(start.length - numParams, numParams);
				if (bezier) { // disable first control point
					slice[numParams - 6] = slice[numParams - 2];
					slice[numParams - 5] = slice[numParams - 1];
				}
				start = start.concat(slice);
			}
		}

		if (startBaseLine) { // append the base lines for areas
			start = start.concat(startBaseLine);
			end = end.concat(endBaseLine);
		}
		return [start, end];
	}
function (elem, fromD, toD) {
		fromD = fromD || '';
		var shift = elem.shift,
			bezier = fromD.indexOf('C') > -1,
			numParams = bezier ? 7 : 3,
			endLength,
			slice,
			i,
			start = fromD.split(' '),
			end = [].concat(toD), // copy
			startBaseLine,
			endBaseLine,
			sixify = function (arr) { // in splines make move points have six parameters like bezier curves
				i = arr.length;
				while (i--) {
					if (arr[i] === M) {
						arr.splice(i + 1, 0, arr[i + 1], arr[i + 2], arr[i + 1], arr[i + 2]);
					}
				}
			};

		if (bezier) {
			sixify(start);
			sixify(end);
		}

		// pull out the base lines before padding
		if (elem.isArea) {
			startBaseLine = start.splice(start.length - 6, 6);
			endBaseLine = end.splice(end.length - 6, 6);
		}

		// if shifting points, prepend a dummy point to the end path
		if (shift <= end.length / numParams && start.length === end.length) {
			while (shift--) {
				end = [].concat(end).splice(0, numParams).concat(end);
			}
		}
		elem.shift = 0; // reset for following animations

		// copy and append last point until the length matches the end length
		if (start.length) {
			endLength = end.length;
			while (start.length < endLength) {

				//bezier && sixify(start);
				slice = [].concat(start).splice(start.length - numParams, numParams);
				if (bezier) { // disable first control point
					slice[numParams - 6] = slice[numParams - 2];
					slice[numParams - 5] = slice[numParams - 1];
				}
				start = start.concat(slice);
			}
		}

		if (startBaseLine) { // append the base lines for areas
			start = start.concat(startBaseLine);
			end = end.concat(endBaseLine);
		}
		return [start, end];
	}
function ( elem , fromD , toD ) { fromD = fromD || '' ; var shift = elem . shift , bezier = fromD . indexOf ( 'C' ) > - 1 , numParams = bezier ? 7 : 3 , endLength , slice , i , start = fromD . split ( ' ' ) , end = [ ] . concat ( toD ) , // copy startBaseLine , endBaseLine , sixify = function ( arr ) { // in splines make move points have six parameters like bezier curves i = arr . length ; while ( i -- ) { if ( arr [ i ] === M ) { arr . splice ( i + 1 , 0 , arr [ i + 1 ] , arr [ i + 2 ] , arr [ i + 1 ] , arr [ i + 2 ] ) ; } } } ; if ( bezier ) { sixify ( start ) ; sixify ( end ) ; } // pull out the base lines before padding if ( elem . isArea ) { startBaseLine = start . splice ( start . length - 6 , 6 ) ; endBaseLine = end . splice ( end . length - 6 , 6 ) ; } // if shifting points, prepend a dummy point to the end path if ( shift <= end . length / numParams && start . length === end . length ) { while ( shift -- ) { end = [ ] . concat ( end ) . splice ( 0 , numParams ) . concat ( end ) ; } } elem . shift = 0 ; // reset for following animations // copy and append last point until the length matches the end length if ( start . length ) { endLength = end . length ; while ( start . length < endLength ) { //bezier && sixify(start); slice = [ ] . concat ( start ) . splice ( start . length - numParams , numParams ) ; if ( bezier ) { // disable first control point slice [ numParams - 6 ] = slice [ numParams - 2 ] ; slice [ numParams - 5 ] = slice [ numParams - 1 ] ; } start = start . concat ( slice ) ; } } if ( startBaseLine ) { // append the base lines for areas start = start . concat ( startBaseLine ) ; end = end . concat ( endBaseLine ) ; } return [ start , end ] ; }
Prepare start and end values so that the path can be animated one to one
Prepare start and end values so that the path can be animated one to one