mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 19:00:09 +00:00 
			
		
		
		
	more tweaking and fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									e785f82833
								
							
						
					
					
						commit
						5762735766
					
				| @ -294,11 +294,9 @@ module.CurrentImageIndicator = core.ImageGridFeatures.Feature({ | |||||||
| 				this.updateCurrentImageIndicator(null, 'before') }], | 				this.updateCurrentImageIndicator(null, 'before') }], | ||||||
| 
 | 
 | ||||||
| 		// hide and remove current image indicator...
 | 		// hide and remove current image indicator...
 | ||||||
| 		// NOTE: it will be reconstructed on 
 |  | ||||||
| 		// 		next .focusImage(..)
 |  | ||||||
| 		['ribbonPanning.pre', | 		['ribbonPanning.pre', | ||||||
| 			function(){ | 			function(){ | ||||||
| 				/* XXX do we need to restore after pan???  | 				//* XXX do we need to restore after pan??? 
 | ||||||
| 				this.__current_image_indicator_restore_timeout | 				this.__current_image_indicator_restore_timeout | ||||||
| 					&& clearTimeout(this.__current_image_indicator_restore_timeout) | 					&& clearTimeout(this.__current_image_indicator_restore_timeout) | ||||||
| 				delete this.__current_image_indicator_restore_timeout | 				delete this.__current_image_indicator_restore_timeout | ||||||
| @ -308,19 +306,33 @@ module.CurrentImageIndicator = core.ImageGridFeatures.Feature({ | |||||||
| 					.find('.current-marker') | 					.find('.current-marker') | ||||||
| 						.velocity({opacity: 0}, { duration: 100 }) | 						.velocity({opacity: 0}, { duration: 100 }) | ||||||
| 			}], | 			}], | ||||||
| 		/* XXX do we need to restore after pan???  | 		// XXX need to animate this...
 | ||||||
|  | 		['centerImage.pre', | ||||||
|  | 			function(){ | ||||||
|  | 				var m = this.dom.find('.current-marker')[0] | ||||||
|  | 				m  | ||||||
|  | 					&& (m.style.marginLeft = '') | ||||||
|  | 			}], | ||||||
| 		['ribbonPanning.post', | 		['ribbonPanning.post', | ||||||
| 			function(){ | 			function(){ | ||||||
| 				var that = this | 				var that = this | ||||||
| 				this.__current_image_indicator_restore_timeout = setTimeout(function(){ | 				this.__current_image_indicator_restore_timeout = setTimeout(function(){ | ||||||
| 					that.updateCurrentImageIndicator() | 					that.updateCurrentImageIndicator() | ||||||
| 
 | 
 | ||||||
| 					that.dom | 					var cur = that.ribbons.getImage() | ||||||
| 						.find('.current-marker') | 					var marker = that.dom.find('.current-marker') | ||||||
|  | 
 | ||||||
|  | 					marker[0].style.marginLeft = '' | ||||||
|  | 
 | ||||||
|  | 					var m = -marker[0].offsetWidth/2  | ||||||
|  | 					var d = (marker.offset().left - cur.offset().left) / that.scale | ||||||
|  | 
 | ||||||
|  | 					marker[0].style.marginLeft = (m - d) + 'px' | ||||||
|  | 
 | ||||||
|  | 					marker | ||||||
| 						.velocity({opacity: 1}, { duration: 100 }) | 						.velocity({opacity: 1}, { duration: 100 }) | ||||||
| 				}, this.config['current-image-indicator-restore-delay'] || 500) | 				}, this.config['current-image-indicator-restore-delay'] || 500) | ||||||
| 			}], | 			}], | ||||||
| 		//*/
 |  | ||||||
| 
 | 
 | ||||||
| 		// single image view -- fade in indicator after exit...
 | 		// single image view -- fade in indicator after exit...
 | ||||||
| 		['toggleSingleImage', | 		['toggleSingleImage', | ||||||
| @ -458,7 +470,7 @@ module.CurrentImageIndicatorHideOnScreenNav = core.ImageGridFeatures.Feature({ | |||||||
| 
 | 
 | ||||||
| // XXX make this an action...
 | // XXX make this an action...
 | ||||||
| var updateBaseRibbonIndicator = function(img){ | var updateBaseRibbonIndicator = function(img){ | ||||||
| 	var scale = this.ribbons.scale() | 	var scale = this.scale | ||||||
| 	var base = this.ribbons.getRibbon('base') | 	var base = this.ribbons.getRibbon('base') | ||||||
| 	img = this.ribbons.getImage(img) | 	img = this.ribbons.getImage(img) | ||||||
| 	var m = base.find('.base-ribbon-marker') | 	var m = base.find('.base-ribbon-marker') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user