mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 02:40:08 +00:00 
			
		
		
		
	updated todo and general code cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									0c63c43862
								
							
						
					
					
						commit
						2d431916dd
					
				
							
								
								
									
										23
									
								
								ui/TODO.otl
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								ui/TODO.otl
									
									
									
									
									
								
							| @ -1,5 +1,5 @@ | |||||||
| Priority work | Priority work | ||||||
| 	[_] 48% Preview II | 	[_] 52% Preview II | ||||||
| 		[X] 100% sorted images in ribbons | 		[X] 100% sorted images in ribbons | ||||||
| 			[X] 100% stage I: position the promoted/demoted image correctly | 			[X] 100% stage I: position the promoted/demoted image correctly | ||||||
| 			| and correct positioning on promote/demote | 			| and correct positioning on promote/demote | ||||||
| @ -58,7 +58,7 @@ Priority work | |||||||
| 				[X] one (with zooming) | 				[X] one (with zooming) | ||||||
| 			[X] single image mode with zooming | 			[X] single image mode with zooming | ||||||
| 			| ribbons are hidden | 			| ribbons are hidden | ||||||
| 		[_] 25% drag action... | 		[_] 25% drag/move action... | ||||||
| 			[_] basic infrastructure | 			[_] basic infrastructure | ||||||
| 			[X] action: center current image | 			[X] action: center current image | ||||||
| 			[_] while zoomed more than the screen | 			[_] while zoomed more than the screen | ||||||
| @ -67,11 +67,22 @@ Priority work | |||||||
| 			[X] zooming | 			[X] zooming | ||||||
| 			[X] navigation | 			[X] navigation | ||||||
| 			[_] 0% actions | 			[_] 0% actions | ||||||
| 				[_] shifting up to new ribbon pushes the current row down... | 				[_] bug: shifting up to new ribbon pushes the current row down... | ||||||
| 		[_] 0% cleanup UI | 		[_] 25% cleanup UI | ||||||
| 			[_] stretch viewer to screen | 			[_] stretch viewer to screen | ||||||
| 			[_] fix single image mode | 			[_] fix single image mode | ||||||
| 			| need to center the image correctly... | 			| need to center the image correctly... | ||||||
|  | 			[_] 55% add screen buttons for all actions... | ||||||
|  | 				[X] navigation | ||||||
|  | 				[X] actions | ||||||
|  | 				[_] zooming | ||||||
|  | 				[_] 20% zoom presets | ||||||
|  | 					[_] in | ||||||
|  | 					[_] out | ||||||
|  | 					[_] single | ||||||
|  | 					[_] three | ||||||
|  | 					[X] wide | ||||||
|  | 					| toggle... | ||||||
| 			[_] 0% layout | 			[_] 0% layout | ||||||
| 				[_] tablet | 				[_] tablet | ||||||
| 				| - buttons at sides | 				| - buttons at sides | ||||||
| @ -90,8 +101,8 @@ Priority work | |||||||
| 				[_] basic screen | 				[_] basic screen | ||||||
| 				[_] keyboard config (low priority) | 				[_] keyboard config (low priority) | ||||||
| 				[_] view mode (low priority) | 				[_] view mode (low priority) | ||||||
| 			[_] 0% debug mode | 			[X] 100% debug mode | ||||||
| 				[_] toggle cross-hair | 				[X] toggle cross-hair | ||||||
| 		[_] 0% optional features... | 		[_] 0% optional features... | ||||||
| 	[_] 0% misc | 	[_] 0% misc | ||||||
| 		[_] add sort/re-sort capability... | 		[_] add sort/re-sort capability... | ||||||
|  | |||||||
| @ -28,18 +28,6 @@ function setupGestures(){ | |||||||
| 			swipeUp: shiftImageUp, | 			swipeUp: shiftImageUp, | ||||||
| 			swipeDown: shiftImageDown, | 			swipeDown: shiftImageDown, | ||||||
| 		}) | 		}) | ||||||
| 		/* XXX jquery.mobile handlers... (with this I'm getting way too much bling) |  | ||||||
| 		.bind('swipeleft', function(e){ |  | ||||||
| 			nextImage() |  | ||||||
| 			e.preventDefault() |  | ||||||
| 			return false |  | ||||||
| 		}) |  | ||||||
| 		.bind('swiperight', function(e){ |  | ||||||
| 			prevImage() |  | ||||||
| 			e.preventDefault() |  | ||||||
| 			return false |  | ||||||
| 		}) |  | ||||||
| 		*/ |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -54,7 +42,6 @@ function setupControlElements(){ | |||||||
| 	$('.demote').click(shiftImageUp) | 	$('.demote').click(shiftImageUp) | ||||||
| 	$('.promote').click(shiftImageDown) | 	$('.promote').click(shiftImageDown) | ||||||
| 	$('.toggle-wide').click(toggleWideView) | 	$('.toggle-wide').click(toggleWideView) | ||||||
| 	// XXX need to update this to real zooming...
 |  | ||||||
| 	$('.toggle-single').click(toggleRibbonView) | 	$('.toggle-single').click(toggleRibbonView) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -96,15 +83,14 @@ function setCurrentImage(){ | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // center other ribbons relative to current image...
 | // center other ribbons relative to current image...
 | ||||||
| function alignRibbons(){ |  | ||||||
| // XXX only two ribbons are positioned at this point...
 | // XXX only two ribbons are positioned at this point...
 | ||||||
|  | function alignRibbons(){ | ||||||
| 	// XXX might be goot to move this to a more generic location...
 | 	// XXX might be goot to move this to a more generic location...
 | ||||||
| 	var id = $('.current.image').attr('id') | 	var id = $('.current.image').attr('id') | ||||||
| 	var directions = ['prev', 'next'] | 	var directions = ['prev', 'next'] | ||||||
| 	for(var i in directions){ | 	for(var i in directions){ | ||||||
| 		var ribbon = $('.current.ribbon')[directions[i]]('.ribbon') | 		var ribbon = $('.current.ribbon')[directions[i]]('.ribbon') | ||||||
| 		if(ribbon.length == 1){ | 		if(ribbon.length == 1){ | ||||||
| 			// XXX this is not optimal...
 |  | ||||||
| 			var img = getImageBefore(id, ribbon) | 			var img = getImageBefore(id, ribbon) | ||||||
| 			if(img != null){ | 			if(img != null){ | ||||||
| 				alignRibbon(img, 'before') | 				alignRibbon(img, 'before') | ||||||
| @ -118,42 +104,6 @@ function alignRibbons(){ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // XXX depricated...
 |  | ||||||
| /* |  | ||||||
| function handleImageClick(e) { |  | ||||||
| 	var cur = $(this) |  | ||||||
| 
 |  | ||||||
| 	// switch classes...
 |  | ||||||
| 	cur.parents().siblings().children(".image").removeClass("current") |  | ||||||
| 	cur.siblings(".image").removeClass("current") |  | ||||||
| 
 |  | ||||||
| 	cur.siblings().children(".image").removeClass("current") |  | ||||||
| 	cur.parents().siblings(".ribbon").removeClass("current") |  | ||||||
| 
 |  | ||||||
| 	cur.addClass("current") |  | ||||||
| 	cur.parents(".ribbon").addClass("current") |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 	var container = cur.parents('.container') |  | ||||||
| 	var field = cur.parents(".field") |  | ||||||
| 
 |  | ||||||
| 	var image_offset = cur.offset() |  | ||||||
| 	var field_offset = field.offset() |  | ||||||
| 
 |  | ||||||
| 	// center the current image...
 |  | ||||||
| 	field.css({ |  | ||||||
| 		left: field_offset.left - image_offset.left + (container.innerWidth() - cur.innerWidth())/2,  |  | ||||||
| 		top: field_offset.top - image_offset.top + (container.innerHeight() - cur.innerHeight())/2  |  | ||||||
| 	}) |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 	// XXX do I need this???
 |  | ||||||
| 	e.preventDefault(); |  | ||||||
| } |  | ||||||
| */ |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| // this sets the zooming factor used in manual zooming...
 | // this sets the zooming factor used in manual zooming...
 | ||||||
| var ZOOM_FACTOR = 2 | var ZOOM_FACTOR = 2 | ||||||
| 
 | 
 | ||||||
| @ -272,6 +222,7 @@ function setViewerMode(mode){ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // ribbon/single view modes...
 | // ribbon/single view modes...
 | ||||||
|  | // XXX CSS broken...
 | ||||||
| function toggleRibbonView(){ | function toggleRibbonView(){ | ||||||
| 	if($('.single-image-mode').length > 0){ | 	if($('.single-image-mode').length > 0){ | ||||||
| 		unsetViewerMode('single-image-mode') | 		unsetViewerMode('single-image-mode') | ||||||
| @ -283,18 +234,13 @@ function toggleRibbonView(){ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // wide view mode toggle...
 | // wide view mode toggle...
 | ||||||
| // XXX replace this with adequate zooming...
 |  | ||||||
| // XXX broken...
 |  | ||||||
| function toggleWideView(){ | function toggleWideView(){ | ||||||
| 	if($('.wide-view-mode').length > 0){ | 	if($('.wide-view-mode').length > 0){ | ||||||
| 		setContainerZoom(0.1) |  | ||||||
| 		//$('.viewer').addClass('wide-view-more')
 |  | ||||||
| 		//unsetViewerMode('wide-view-mode')
 |  | ||||||
| 	} else { |  | ||||||
| 		setContainerZoom(1) | 		setContainerZoom(1) | ||||||
| 		//$('.viewer').removeClass('wide-view-more')
 | 		$('.viewer').removeClass('wide-view-mode') | ||||||
| 		//unsetViewerMode('single-image-mode')
 | 	} else { | ||||||
| 		//setViewerMode('wide-view-mode')
 | 		setContainerZoom(0.1) | ||||||
|  | 		$('.viewer').addClass('wide-view-mode') | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -437,6 +383,7 @@ function getImageBefore_bin(id, ribbon){ | |||||||
| 	return $(images[i]) | 	return $(images[i]) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | // set the default search...
 | ||||||
| var getImageBefore = getImageBefore_bin | var getImageBefore = getImageBefore_bin | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -459,6 +406,7 @@ function centerRibbonVertically(ribbon){ | |||||||
| // NOTE: below 'direction' is meant in the html sence, i.e. next/prev...
 | // NOTE: below 'direction' is meant in the html sence, i.e. next/prev...
 | ||||||
| 
 | 
 | ||||||
| // create ribbon above/below helpers...
 | // create ribbon above/below helpers...
 | ||||||
|  | // XXX
 | ||||||
| function createRibbon(direction){ | function createRibbon(direction){ | ||||||
| 	if(direction == 'next'){ | 	if(direction == 'next'){ | ||||||
| 		var insert = 'insertAfter' | 		var insert = 'insertAfter' | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user