mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 11:20:09 +00:00 
			
		
		
		
	some refactoring of viewer.js...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									2f2a6a0045
								
							
						
					
					
						commit
						f2b7d68672
					
				| @ -468,31 +468,21 @@ actions.Actions(Client, { | ||||
| 				this.ribbons = ribbons.Ribbons(viewer, data.images) | ||||
| 			} | ||||
| 
 | ||||
| 			// NOTE: this is here to prevent animations when the view 
 | ||||
| 			// 		is resized and recentered...
 | ||||
| 			this.ribbons.preventTransitions() | ||||
| 
 | ||||
| 			// XXX should we use this.reload() here???
 | ||||
| 			return function(){ | ||||
| 				// XXX do a partial load...
 | ||||
| 				// XXX
 | ||||
| 
 | ||||
| 				this.ribbons.updateData(this.data) | ||||
| 				this.focusImage() | ||||
| 
 | ||||
| 				this.ribbons.restoreTransitions() | ||||
| 				this.reload() | ||||
| 			} | ||||
| 		}], | ||||
| 	reload: [ | ||||
| 	reload: ['Reload viewer', | ||||
| 		function(){ | ||||
| 			this.ribbons.preventTransitions() | ||||
| 
 | ||||
| 			return function(){ | ||||
| 				this.ribbons.updateData(this.data) | ||||
| 				this.focusImage() | ||||
| 			this.ribbons.updateData(this.data) | ||||
| 			this.focusImage() | ||||
| 
 | ||||
| 				this.ribbons.restoreTransitions() | ||||
| 			} | ||||
| 			this.ribbons.restoreTransitions() | ||||
| 		}], | ||||
| 	clear: [ | ||||
| 		// XXX do we need to delete the ribbons???
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user