mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-11-03 21:00:14 +00:00 
			
		
		
		
	minor tweaks and bugfixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									f757f776ff
								
							
						
					
					
						commit
						9598d7ab7d
					
				
							
								
								
									
										10
									
								
								ui/data.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								ui/data.js
									
									
									
									
									
								
							@ -57,6 +57,16 @@ var CONFIG = {
 | 
			
		||||
	// Application name...
 | 
			
		||||
	app_name: 'ImageGrid.Viewer',
 | 
			
		||||
 | 
			
		||||
	// Navigation...
 | 
			
		||||
	//
 | 
			
		||||
	// The number of moves after which the default direction will be 
 | 
			
		||||
	// changed...
 | 
			
		||||
	//
 | 
			
		||||
	// This affects:
 | 
			
		||||
	// 	- default direction to focus after current image is shifted
 | 
			
		||||
	// 	- default direction of the slideshow
 | 
			
		||||
	steps_to_change_direction: 2,
 | 
			
		||||
	
 | 
			
		||||
	// Loader configuration...
 | 
			
		||||
	//
 | 
			
		||||
	//						load_screens	
 | 
			
		||||
 | 
			
		||||
@ -6,8 +6,7 @@
 | 
			
		||||
 | 
			
		||||
//var DEBUG = DEBUG != null ? DEBUG : true
 | 
			
		||||
 | 
			
		||||
var STEPS_TO_CHANGE_DIRECTION = 2
 | 
			
		||||
var _STEPS_LEFT_TO_CHANGE_DIRECTION = STEPS_TO_CHANGE_DIRECTION
 | 
			
		||||
var _STEPS_LEFT_TO_CHANGE_DIRECTION = CONFIG.steps_to_change_direction
 | 
			
		||||
var DIRECTION = 'next'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -19,10 +18,10 @@ function updateDirection(direction){
 | 
			
		||||
		_STEPS_LEFT_TO_CHANGE_DIRECTION--
 | 
			
		||||
		if(_STEPS_LEFT_TO_CHANGE_DIRECTION == 0){
 | 
			
		||||
			DIRECTION = direction
 | 
			
		||||
			_STEPS_LEFT_TO_CHANGE_DIRECTION = 2
 | 
			
		||||
			_STEPS_LEFT_TO_CHANGE_DIRECTION = CONFIG.steps_to_change_direction
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
			_STEPS_LEFT_TO_CHANGE_DIRECTION = 2
 | 
			
		||||
			_STEPS_LEFT_TO_CHANGE_DIRECTION = CONFIG.steps_to_change_direction
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -293,17 +292,19 @@ var KEYBOARD_CONFIG = {
 | 
			
		||||
		title: 'Ribbon view',
 | 
			
		||||
 | 
			
		||||
		Left: {
 | 
			
		||||
				// XXX revise...
 | 
			
		||||
				alt: doc('Shift image left', 
 | 
			
		||||
					function(){ 
 | 
			
		||||
						event.preventDefault()
 | 
			
		||||
						shiftImageLeft() 
 | 
			
		||||
						centerView(null, 'css')
 | 
			
		||||
						// XXX for some odd reason centerRibbons does 
 | 
			
		||||
						// 		something really odd here...
 | 
			
		||||
						// 		something really odd here -- images get to
 | 
			
		||||
						// 		correct positions but the align is totally 
 | 
			
		||||
						// 		wrong...
 | 
			
		||||
						// 		...race condition???
 | 
			
		||||
						//centerRibbons()
 | 
			
		||||
						// XXX HACK...
 | 
			
		||||
						// XXX this still gets misaligned sometimes but this
 | 
			
		||||
						// 		is likely due to one of the align bugs 
 | 
			
		||||
						if(window._center_ribbon_delay != null){
 | 
			
		||||
							clearTimeout(_center_ribbon_delay)
 | 
			
		||||
						}
 | 
			
		||||
@ -317,18 +318,19 @@ var KEYBOARD_CONFIG = {
 | 
			
		||||
				ctrl: 'prev-screen',
 | 
			
		||||
			},
 | 
			
		||||
		Right: {
 | 
			
		||||
				// XXX revise...
 | 
			
		||||
				alt: doc('Shift image right', 
 | 
			
		||||
					function(){ 
 | 
			
		||||
						event.preventDefault()
 | 
			
		||||
						shiftImageRight() 
 | 
			
		||||
						centerView(null, 'css')
 | 
			
		||||
						// XXX for some odd reason centerRibbons does 
 | 
			
		||||
						// 		something really odd here...
 | 
			
		||||
						// 		something really odd here -- images get to
 | 
			
		||||
						// 		correct positions but the align is totally 
 | 
			
		||||
						// 		wrong...
 | 
			
		||||
						// 		...race condition???
 | 
			
		||||
						//centerRibbons()
 | 
			
		||||
						// XXX HACK...
 | 
			
		||||
						// XXX this still gets misaligned sometimes but this
 | 
			
		||||
						// 		is likely due to one of the align bugs 
 | 
			
		||||
						// 		(see: TODO.otl)
 | 
			
		||||
						if(window._center_ribbon_delay != null){
 | 
			
		||||
							clearTimeout(_center_ribbon_delay)
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
@ -33,8 +33,14 @@ function _addMark(cls, gid, image){
 | 
			
		||||
		mark = $('<div class="mark"/>')
 | 
			
		||||
			.addClass(gid)
 | 
			
		||||
			.addClass(cls)
 | 
			
		||||
			.insertAfter(image)
 | 
			
		||||
			//.insertAfter(image)
 | 
			
		||||
	} 
 | 
			
		||||
 | 
			
		||||
	// make sure the mark is explicitly after the image...
 | 
			
		||||
	// XXX think of an eficient way to test if we need to re-insert...
 | 
			
		||||
	mark
 | 
			
		||||
		.insertAfter(image)
 | 
			
		||||
 | 
			
		||||
	return mark
 | 
			
		||||
}
 | 
			
		||||
function _removeMark(cls, gid, image){
 | 
			
		||||
 | 
			
		||||
@ -1169,7 +1169,7 @@ function zoomOut(){
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************************************************** Editor Actions ***/
 | 
			
		||||
// NOTE: for shiftImageRight/shiftImageLeft see data.js, as they depend
 | 
			
		||||
// NOTE: for shiftImageRight/shiftImageLeft see sort.js, as they depend
 | 
			
		||||
// 		on data ordering...
 | 
			
		||||
 | 
			
		||||
function shiftImageTo(image, direction, moving, force_create_ribbon){
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user