mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 19:00:09 +00:00 
			
		
		
		
	cleanup and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									306a55e2be
								
							
						
					
					
						commit
						1993856936
					
				| @ -66,18 +66,13 @@ core.ImageGridFeatures.Feature('viewer-testing', [ | |||||||
| 	'ui', | 	'ui', | ||||||
| 	'keyboard', | 	'keyboard', | ||||||
| 
 | 
 | ||||||
| 	// XXX BUG?: should this be indicated as a missing dependency???
 | 	// missing suggested feature test...
 | ||||||
| 	'missing-feature', | 	'missing-feature', | ||||||
| 
 | 
 | ||||||
| 	// XXX
 |  | ||||||
| 	//'ui-blank-render',
 |  | ||||||
| 	// XXX BUG: features: this pulls in all the suggestions that depend
 |  | ||||||
| 	// 		regardless of weather they depend on it or not:
 |  | ||||||
| 	// 			'ui-partial-ribbons'
 |  | ||||||
| 	'ui-ribbons-render', | 	'ui-ribbons-render', | ||||||
| 	'ui-partial-ribbons-render', |  | ||||||
| 	'ui-vdom-render', | 	'ui-vdom-render', | ||||||
| 	//'ui-react-render',
 | 	//'ui-react-render',
 | ||||||
|  | 	'ui-blank-render', | ||||||
| 	//*/
 | 	//*/
 | ||||||
| 
 | 
 | ||||||
| 	// features...
 | 	// features...
 | ||||||
|  | |||||||
| @ -27,6 +27,8 @@ module.DragAndDrop = core.ImageGridFeatures.Feature({ | |||||||
| 	], | 	], | ||||||
| 
 | 
 | ||||||
| 	handlers: [ | 	handlers: [ | ||||||
|  | 		// XXX add type/handler registry -- might be a good idea to add 
 | ||||||
|  | 		// 		an action attribute/handler...
 | ||||||
| 		// XXX would be nice to load a directory tree as ribbons...
 | 		// XXX would be nice to load a directory tree as ribbons...
 | ||||||
| 		// XXX HACK-ish...
 | 		// XXX HACK-ish...
 | ||||||
| 		['start', function(){ | 		['start', function(){ | ||||||
| @ -78,7 +80,7 @@ module.DragAndDrop = core.ImageGridFeatures.Feature({ | |||||||
| 					// images when they are loaded later...
 | 					// images when they are loaded later...
 | ||||||
| 					that.images.forEach(function(gid, img){ | 					that.images.forEach(function(gid, img){ | ||||||
| 						lst[img.path].gid = gid | 						lst[img.path].gid = gid | ||||||
| 						img.name = img.path | 						img.name = img.path.split('.').slice(0, -1).join('.') | ||||||
| 					}) | 					}) | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
|  | |||||||
| @ -23,7 +23,7 @@ | |||||||
|     "glob": "^4.0.6", |     "glob": "^4.0.6", | ||||||
|     "guarantee-events": "^1.0.0", |     "guarantee-events": "^1.0.0", | ||||||
|     "ig-actions": "^3.0.0", |     "ig-actions": "^3.0.0", | ||||||
|     "ig-features": "^3.1.5", |     "ig-features": "^3.1.7", | ||||||
|     "ig-object": "^1.0.1", |     "ig-object": "^1.0.1", | ||||||
|     "openseadragon": "^2.1.0", |     "openseadragon": "^2.1.0", | ||||||
|     "preact": "^8.1.0", |     "preact": "^8.1.0", | ||||||
|  | |||||||
| @ -103,7 +103,7 @@ $(function(){ | |||||||
| 	// list all loaded modules...
 | 	// list all loaded modules...
 | ||||||
| 	var m = requirejs.s.contexts._.defined | 	var m = requirejs.s.contexts._.defined | ||||||
| 	m = Object.keys(m).filter(function(e){ return m[e] != null }) | 	m = Object.keys(m).filter(function(e){ return m[e] != null }) | ||||||
| 	console.log('Modules (%d):', m.length, m) | 	console.log('Modules:', m) | ||||||
| 
 | 
 | ||||||
| 	/*/ self-test... | 	/*/ self-test... | ||||||
| 	var test = viewer.ImageGridFeatures.buildFeatureList() | 	var test = viewer.ImageGridFeatures.buildFeatureList() | ||||||
| @ -146,26 +146,25 @@ $(function(){ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 	// report stuff...
 | 	// report stuff...
 | ||||||
| 	console.log('Features loaded (%d):', | 	console.log('Loaded features:', | ||||||
| 		ig.features.features.length,  |  | ||||||
| 		ig.features.features) | 		ig.features.features) | ||||||
| 	console.log('Features disabled (%d):',  | 	console.log('Disabled features:',  | ||||||
| 		ig.features.disabled.length,  |  | ||||||
| 		ig.features.disabled) | 		ig.features.disabled) | ||||||
| 	console.log('Features not applicable (%d):',  | 	console.log('Not applicable features:',  | ||||||
| 		ig.features.unapplicable.length,  |  | ||||||
| 		ig.features.unapplicable) | 		ig.features.unapplicable) | ||||||
| 
 | 
 | ||||||
| 	ig.features.excluded.length > 0  | 	ig.features.excluded.length > 0  | ||||||
| 		&& console.warn('Features excluded (%d):', | 		&& console.log('Excluded features:', | ||||||
| 			ig.features.excluded.length,  |  | ||||||
| 			ig.features.excluded) | 			ig.features.excluded) | ||||||
| 
 | 
 | ||||||
| 	// NOTE: fatal errors will get reported by setup...
 | 	// NOTE: fatal errors will get reported by setup...
 | ||||||
| 	if(ig.features.error){ | 	if(ig.features.error){ | ||||||
| 		var err = ig.features.error | 		var err = ig.features.error | ||||||
|  | 		err.missing_suggested.length > 0 | ||||||
|  | 			&& console.log('Missing suggested features:',  | ||||||
|  | 				err.missing_suggested) | ||||||
| 		err.missing.length > 0 | 		err.missing.length > 0 | ||||||
| 			&& console.warn('Features disabled (%d):',  | 			&& console.warn('Missing dependencies:',  | ||||||
| 				err.missing) | 				err.missing) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user