src/main/java/com/gitblit/wicket/pages/scripts/imgdiff.js
/**
	 * As moveTo, but determines an appropriate duration in the range [0..maxDuration] on its own,
	 * depending on the distance the handle would move. If no maxDuration is given it defaults
	 * to 1500ms.
	 */
As moveTo, but determines an appropriate duration in the range [0..maxDuration] on its own,
depending on the distance the handle would move. If no maxDuration is given it defaults
to 1500ms.
As moveTo but determines an appropriate duration in the range [ 0 .. maxDuration ] on its own depending on the distance the handle would move . If no maxDuration is given it defaults to 1500ms .
function moveAuto(ratio, maxDuration, callback) {
		if (typeof maxDuration == 'undefined') maxDuration = 1500;
		var delta = ratio - lastRatio;
		if (delta < 0) delta = -delta;
		var speed = $elem.innerWidth() * delta * 2;
		if (speed > maxDuration) speed = maxDuration;
		moveTo(ratio, speed, callback);
	}
function moveAuto ( ratio , maxDuration , callback ) { if ( typeof maxDuration == 'undefined' ) maxDuration = 1500 ; var delta = ratio - lastRatio ; if ( delta < 0 ) delta = - delta ; var speed = $elem . innerWidth ( ) * delta * 2 ; if ( speed > maxDuration ) speed = maxDuration ; moveTo ( ratio , speed , callback ) ; }
As moveTo, but determines an appropriate duration in the range [0..maxDuration] on its own,
 depending on the distance the handle would move.
As moveTo but determines an appropriate duration in the range [ 0 .. maxDuration ] on its own depending on the distance the handle would move .