mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	fixes, tweaks and one hack...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									d4233aaf07
								
							
						
					
					
						commit
						29f2639000
					
				| @ -160,9 +160,24 @@ TREE.dir_c.dir_b.tree = TREE | |||||||
| var use_disabled = true | var use_disabled = true | ||||||
| var show_files = false | var show_files = false | ||||||
| 
 | 
 | ||||||
|  | requirejs.config({ | ||||||
|  | 	paths: { | ||||||
|  | 		'lib/object': '../../node_modules/ig-object/object', | ||||||
|  | 		'lib/actions': '../../node_modules/ig-actions/actions', | ||||||
|  | 		'lib/features': '../../node_modules/ig-features/features', | ||||||
|  | 		//'lib/keyboard': '../../node_modules/ig-keyboard/keyboard', | ||||||
|  | 	},	 | ||||||
|  | 	map: { | ||||||
|  | 		'*': { | ||||||
|  | 			'../object': 'lib/object', | ||||||
|  | 		}, | ||||||
|  | 	}, | ||||||
|  | }) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| requirejs([ | requirejs([ | ||||||
| 			'../keyboard',  | 			'../keyboard',  | ||||||
| 			'../object',  | 			'lib/object',  | ||||||
| 			'../toggler',  | 			'../toggler',  | ||||||
| 			'./browse' | 			'./browse' | ||||||
| 		], function(k, o, t, br){ | 		], function(k, o, t, br){ | ||||||
|  | |||||||
| @ -158,6 +158,7 @@ requirejs.config({ | |||||||
| 		'lib/object': '../../node_modules/ig-object/object', | 		'lib/object': '../../node_modules/ig-object/object', | ||||||
| 		'lib/actions': '../../node_modules/ig-actions/actions', | 		'lib/actions': '../../node_modules/ig-actions/actions', | ||||||
| 		'lib/features': '../../node_modules/ig-features/features', | 		'lib/features': '../../node_modules/ig-features/features', | ||||||
|  | 		'lib/walk': '../../node_modules/generic-walk/walk', | ||||||
| 		//'lib/keyboard': '../../node_modules/ig-keyboard/keyboard', | 		//'lib/keyboard': '../../node_modules/ig-keyboard/keyboard', | ||||||
| 	},	 | 	},	 | ||||||
| 	map: { | 	map: { | ||||||
|  | |||||||
| @ -11,10 +11,7 @@ var toggler = require('../toggler') | |||||||
| var keyboard = require('../keyboard') | var keyboard = require('../keyboard') | ||||||
| var object = require('../object') | var object = require('../object') | ||||||
| var widget = require('./widget') | var widget = require('./widget') | ||||||
| 
 | var walk = require('lib/walk').walk | ||||||
| // XXX
 |  | ||||||
| //var walk = require('lib/walk')
 |  | ||||||
| var walk = require('../../node_modules/generic-walk/walk').walk |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -2984,7 +2981,8 @@ var BrowserPrototype = { | |||||||
| 		// Setup basic event handlers...
 | 		// Setup basic event handlers...
 | ||||||
| 		// keyboard...
 | 		// keyboard...
 | ||||||
| 		d.addEventListener('keydown',  | 		d.addEventListener('keydown',  | ||||||
| 			keyboard.makePausableKeyboardHandler(this.keyboard, | 			this.__keyboard_handler = this.__keyboard_handler  | ||||||
|  | 				|| keyboard.makePausableKeyboardHandler(this.keyboard, | ||||||
| 					function(){ console.log('KEY:', ...arguments) },//null,
 | 					function(){ console.log('KEY:', ...arguments) },//null,
 | ||||||
| 					this)) | 					this)) | ||||||
| 		// focus...
 | 		// focus...
 | ||||||
| @ -3025,14 +3023,9 @@ var BrowserPrototype = { | |||||||
| 	//
 | 	//
 | ||||||
| 	// XXX instrument interactions...
 | 	// XXX instrument interactions...
 | ||||||
| 	// XXX register event handlers...
 | 	// XXX register event handlers...
 | ||||||
| 	// XXX BUG: scrollbar in list can get focus and intercept key events...
 | 	// XXX HANCK: preventing scrollbar from grabbing focus -- there is 
 | ||||||
| 	// 			- document.querySelector(':focus') returns null
 | 	// 		definitely a better solution implemented in browse.js + ImageGrid
 | ||||||
| 	//			- does not reproduce in the ImageGrid.Viewer
 | 	// 		(the effect seems to be originating out of ImageGrid...)
 | ||||||
| 	//			- scrollbar styling does not seem to affect this...
 |  | ||||||
| 	//		to reproduce:
 |  | ||||||
| 	//			- load a scrolled dialog...
 |  | ||||||
| 	//			- click on the scrollbar
 |  | ||||||
| 	//				- now the browser does not get key events
 |  | ||||||
| 	renderList: function(items, context){ | 	renderList: function(items, context){ | ||||||
| 		var that = this | 		var that = this | ||||||
| 		var options = context.options || this.options | 		var options = context.options || this.options | ||||||
| @ -3049,6 +3042,13 @@ var BrowserPrototype = { | |||||||
| 		// list...
 | 		// list...
 | ||||||
| 		var list = document.createElement('div') | 		var list = document.createElement('div') | ||||||
| 		list.classList.add('list', 'v-block') | 		list.classList.add('list', 'v-block') | ||||||
|  | 		// XXX HACK: prevent scrollbar from grabbing focus...
 | ||||||
|  | 		list.addEventListener('mousedown',  | ||||||
|  | 			function(){ | ||||||
|  | 				setTimeout(function(){ | ||||||
|  | 					that.focused  | ||||||
|  | 						&& !list.querySelector(':focus') | ||||||
|  | 						&& that.focused.dom.focus() }, 0) }) | ||||||
| 		items | 		items | ||||||
| 			.forEach(function(item){ | 			.forEach(function(item){ | ||||||
| 				list.appendChild(item instanceof Array ?  | 				list.appendChild(item instanceof Array ?  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user