public/ckeditor/_source/plugins/undo/plugin.js
function( isUndo )
		{
			var snapshots = this.snapshots,
				currentImage = this.currentImage,
				image, i;

			if ( currentImage )
			{
				if ( isUndo )
				{
					for ( i = this.index - 1 ; i >= 0 ; i-- )
					{
						image = snapshots[ i ];
						if ( !currentImage.equals( image, true ) )
						{
							image.index = i;
							return image;
						}
					}
				}
				else
				{
					for ( i = this.index + 1 ; i < snapshots.length ; i++ )
					{
						image = snapshots[ i ];
						if ( !currentImage.equals( image, true ) )
						{
							image.index = i;
							return image;
						}
					}
				}
			}

			return null;
		}
function( isUndo )
		{
			var snapshots = this.snapshots,
				currentImage = this.currentImage,
				image, i;

			if ( currentImage )
			{
				if ( isUndo )
				{
					for ( i = this.index - 1 ; i >= 0 ; i-- )
					{
						image = snapshots[ i ];
						if ( !currentImage.equals( image, true ) )
						{
							image.index = i;
							return image;
						}
					}
				}
				else
				{
					for ( i = this.index + 1 ; i < snapshots.length ; i++ )
					{
						image = snapshots[ i ];
						if ( !currentImage.equals( image, true ) )
						{
							image.index = i;
							return image;
						}
					}
				}
			}

			return null;
		}
function ( isUndo ) { var snapshots = this . snapshots , currentImage = this . currentImage , image , i ; if ( currentImage ) { if ( isUndo ) { for ( i = this . index - 1 ; i >= 0 ; i -- ) { image = snapshots [ i ] ; if ( ! currentImage . equals ( image , true ) ) { image . index = i ; return image ; } } } else { for ( i = this . index + 1 ; i < snapshots . length ; i ++ ) { image = snapshots [ i ] ; if ( ! currentImage . equals ( image , true ) ) { image . index = i ; return image ; } } } } return null ; }
Get the closest available image.
Get the closest available image .