mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	fixes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									419ac81cb3
								
							
						
					
					
						commit
						4553a25f2f
					
				| @ -279,6 +279,13 @@ body { | |||||||
| 	font-style: italic; | 	font-style: italic; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | /* Feature list */ | ||||||
|  | .browse-widget.feature-list .list .item[root="true"] .text:after { | ||||||
|  | 	content: "*"; | ||||||
|  | 	margin-left: 0px; | ||||||
|  | 	opacity: 0.5; | ||||||
|  | 	font-style: italic; | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| /* External Editor List */ | /* External Editor List */ | ||||||
| .browse-widget.editor-list .list .item:first-child .text:after { | .browse-widget.editor-list .list .item:first-child .text:after { | ||||||
|  | |||||||
| @ -1801,11 +1801,6 @@ module.CropActions = actions.Actions({ | |||||||
| 		}], | 		}], | ||||||
| 
 | 
 | ||||||
| 	// crop edit actions...
 | 	// crop edit actions...
 | ||||||
| 	// XXX use this as undo for .removeFromCrop(..)
 |  | ||||||
| 	// 		...after we remove images from a crop we lose their containing 
 |  | ||||||
| 	// 		ribbon information and the order might get messed up by 
 |  | ||||||
| 	// 		horizontal shifting if not undone correctly...
 |  | ||||||
| 	// 		...add a way to store additional info in the journal...
 |  | ||||||
| 	// XXX undo -- .removeFromCrop(..) but only the gids that were 
 | 	// XXX undo -- .removeFromCrop(..) but only the gids that were 
 | ||||||
| 	// 		actually added... (???)
 | 	// 		actually added... (???)
 | ||||||
| 	// XXX BUG? order does odd things...
 | 	// XXX BUG? order does odd things...
 | ||||||
|  | |||||||
| @ -226,7 +226,7 @@ var CollectionActions = actions.Actions({ | |||||||
| 	//
 | 	//
 | ||||||
| 	collectionLoading: ['- Collections/', | 	collectionLoading: ['- Collections/', | ||||||
| 		core.doc`This is called by .loadCollection(..) or one of the 
 | 		core.doc`This is called by .loadCollection(..) or one of the 
 | ||||||
| 		overloading actions when collection load is done... | 		overloading actions around the collection load... | ||||||
| 
 | 
 | ||||||
| 		The .pre phase is called just before the load and the .post phase  | 		The .pre phase is called just before the load and the .post phase  | ||||||
| 		just after. | 		just after. | ||||||
| @ -1276,6 +1276,7 @@ module.Collection = core.ImageGridFeatures.Feature({ | |||||||
| 		'crop', | 		'crop', | ||||||
| 	], | 	], | ||||||
| 	suggested: [ | 	suggested: [ | ||||||
|  | 		'collections-local-config', | ||||||
| 		'collection-tags', | 		'collection-tags', | ||||||
| 		'auto-collections', | 		'auto-collections', | ||||||
| 
 | 
 | ||||||
| @ -1792,6 +1793,56 @@ module.Collection = core.ImageGridFeatures.Feature({ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | //---------------------------------------------------------------------
 | ||||||
|  | 
 | ||||||
|  | var CollectionLocalConfig = actions.Actions({ | ||||||
|  | 	config: { | ||||||
|  | 		// XXX should this be user editable???
 | ||||||
|  | 		// XXX should/can this be local to collection???
 | ||||||
|  | 		'collection-local-config': [ | ||||||
|  | 		], | ||||||
|  | 	}, | ||||||
|  | 
 | ||||||
|  | 	// handle collection .config
 | ||||||
|  | 	collectionConfigLoader: ['- Collections/', | ||||||
|  | 		{collectionFormat: 'config'}, | ||||||
|  | 		function(title, state, logger){  | ||||||
|  | 			// XXX save old config...
 | ||||||
|  | 
 | ||||||
|  | 			// XXX load new config... 
 | ||||||
|  | 		}], | ||||||
|  | }) | ||||||
|  | 
 | ||||||
|  | var CollectionLocalConfig =  | ||||||
|  | module.CollectionLocalConfig = core.ImageGridFeatures.Feature({ | ||||||
|  | 	title: '', | ||||||
|  | 	doc: '', | ||||||
|  | 
 | ||||||
|  | 	tag: 'collections-local-config', | ||||||
|  | 	depends: [ | ||||||
|  | 		'collections', | ||||||
|  | 	], | ||||||
|  | 
 | ||||||
|  | 	handlers: [ | ||||||
|  | 		/* XXX | ||||||
|  | 		['collectionLoading.pre', | ||||||
|  | 			function(){ | ||||||
|  | 				var that = this | ||||||
|  | 				var state = {} | ||||||
|  | 				var opts = this.config['collection-local-config'] || [] | ||||||
|  | 
 | ||||||
|  | 				// save outgoing collection state...
 | ||||||
|  | 				var cfg = {} | ||||||
|  | 				opts.forEach(function(n){ | ||||||
|  | 					cfg[n] = JSON.parse(JSON.stringify(that.config[n]))  | ||||||
|  | 				}) | ||||||
|  | 			}], | ||||||
|  | 		//*/
 | ||||||
|  | 	], | ||||||
|  | }) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| //---------------------------------------------------------------------
 | //---------------------------------------------------------------------
 | ||||||
| 
 | 
 | ||||||
| var CollectionTagsActions = actions.Actions({ | var CollectionTagsActions = actions.Actions({ | ||||||
| @ -2285,6 +2336,8 @@ var UICollectionActions = actions.Actions({ | |||||||
| 		//'collection-last-used': null,
 | 		//'collection-last-used': null,
 | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
|  | 	// UI...
 | ||||||
|  | 	//
 | ||||||
| 	// XXX would be nice to make this nested (i.e. path list) -- collection grouping... (???)
 | 	// XXX would be nice to make this nested (i.e. path list) -- collection grouping... (???)
 | ||||||
| 	// XXX should we use options object???
 | 	// XXX should we use options object???
 | ||||||
| 	browseCollections: ['Collections/$Collections...', | 	browseCollections: ['Collections/$Collections...', | ||||||
| @ -2638,7 +2691,23 @@ var UICollectionActions = actions.Actions({ | |||||||
| 	joinCollect: [ | 	joinCollect: [ | ||||||
| 		collectionGetterWrapper(function(title){ this.joinCollect(title) })], | 		collectionGetterWrapper(function(title){ this.joinCollect(title) })], | ||||||
| 
 | 
 | ||||||
| 	cropOutImagesInCollection: ['Collections|Crop/Crop $out images in collection...', | 	// XXX do we need this???
 | ||||||
|  | 	cropImagesInCollection: ['Collections|Crop/Crop images in collection...', | ||||||
|  | 		{browseMode: function(){  | ||||||
|  | 			return (!this.collections  | ||||||
|  | 					|| Object.keys(this.collections).length == 0)  | ||||||
|  | 				&& 'disabled' }}, | ||||||
|  | 		mixedModeCollectionAction(function(title){ | ||||||
|  | 			var that = this | ||||||
|  | 			this.ensureCollection(title) | ||||||
|  | 				.then(function(collection){ | ||||||
|  | 					var images = collection.data.getImages('all') | ||||||
|  | 
 | ||||||
|  | 					that.crop(images, false) | ||||||
|  | 				}) | ||||||
|  | 		}, null, false)], | ||||||
|  | 	cropOutImagesInCollection: ['Collections|Crop/Crop $out images in collec$tion...', | ||||||
|  | 		{browseMode: 'cropImagesInCollection'}, | ||||||
| 		mixedModeCollectionAction(function(title){ | 		mixedModeCollectionAction(function(title){ | ||||||
| 			var that = this | 			var that = this | ||||||
| 			this.ensureCollection(title) | 			this.ensureCollection(title) | ||||||
| @ -2652,10 +2721,7 @@ var UICollectionActions = actions.Actions({ | |||||||
| 
 | 
 | ||||||
| 	// XXX should these be here or in marks-specific feature???
 | 	// XXX should these be here or in marks-specific feature???
 | ||||||
| 	markImagesInCollection: ['Collections|Mark/$Mark images in collection...', | 	markImagesInCollection: ['Collections|Mark/$Mark images in collection...', | ||||||
| 		{browseMode: function(){  | 		{browseMode: 'cropImagesInCollection'}, | ||||||
| 			return (!this.collections  |  | ||||||
| 					|| Object.keys(this.collections).length == 0)  |  | ||||||
| 				&& 'disabled' }}, |  | ||||||
| 		mixedModeCollectionAction(function(title){ | 		mixedModeCollectionAction(function(title){ | ||||||
| 			var that = this | 			var that = this | ||||||
| 			this.ensureCollection(title) | 			this.ensureCollection(title) | ||||||
|  | |||||||
| @ -1171,11 +1171,19 @@ var UIIntrospectionActions = actions.Actions({ | |||||||
| 						make.Heading(heading) | 						make.Heading(heading) | ||||||
| 						;(list || []) | 						;(list || []) | ||||||
| 							.forEach(function(tag){ | 							.forEach(function(tag){ | ||||||
| 								make(tag) | 								make(tag, { | ||||||
| 									.attr('feature', tag) | 									attrs: {  | ||||||
| 									.on('open', function(){ that.showFeatureDoc(tag) }) | 										feature: tag,  | ||||||
|  | 										root: no_deps.indexOf(tag) >= 0 ? 'true' : '', | ||||||
|  | 									}, | ||||||
|  | 									open: function(){ that.showFeatureDoc(tag) }, | ||||||
|  | 								}) | ||||||
| 							}) } | 							}) } | ||||||
| 
 | 
 | ||||||
|  | 					// features that have no direct dependencies...
 | ||||||
|  | 					var no_deps = that.features.features.filter(function(f){  | ||||||
|  | 						return (that.features.depends[f] || []).length == 0 }) | ||||||
|  | 
 | ||||||
| 					draw('Loaded (in order)', that.features.features) | 					draw('Loaded (in order)', that.features.features) | ||||||
| 					draw('Excluded', that.features.excluded) | 					draw('Excluded', that.features.excluded) | ||||||
| 					draw('Disabled', that.features.disabled) | 					draw('Disabled', that.features.disabled) | ||||||
| @ -1190,6 +1198,8 @@ var UIIntrospectionActions = actions.Actions({ | |||||||
| 						// XXX loops...
 | 						// XXX loops...
 | ||||||
| 						// XXX conflicts...
 | 						// XXX conflicts...
 | ||||||
| 					} | 					} | ||||||
|  | 				}, { | ||||||
|  | 					cls: 'feature-list', | ||||||
| 				}) | 				}) | ||||||
| 				.run(function(){ | 				.run(function(){ | ||||||
| 					// handle '?' button to browse path...
 | 					// handle '?' button to browse path...
 | ||||||
|  | |||||||
| @ -353,15 +353,14 @@ module.ViewerActions = actions.Actions({ | |||||||
| 				now = true | 				now = true | ||||||
| 				target = null | 				target = null | ||||||
| 			} | 			} | ||||||
| 			var mode = this.config['ribbon-align-mode']  | 			var mode = this.config['ribbon-align-mode'] || 'none' | ||||||
| 				|| this.config['ribbon-focus-mode'] | 			mode = mode == 'none' ? this.config['ribbon-focus-mode'] : mode | ||||||
| 			var modes = this.config['ribbon-align-modes'] | 			var modes = this.config['ribbon-align-modes'] | ||||||
| 
 | 
 | ||||||
| 			if(mode in modes && mode != 'manual'){ | 			if(mode in modes && mode != 'manual' && mode != 'none'){ | ||||||
| 				this[modes[mode]](target, scale, now) | 				this[modes[mode]](target, scale, now) | ||||||
| 
 | 
 | ||||||
| 			// manual...
 | 			// manual...
 | ||||||
| 			// XXX is this correct???
 |  | ||||||
| 			} else { | 			} else { | ||||||
| 				this | 				this | ||||||
| 					.centerRibbon(target) | 					.centerRibbon(target) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user