mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	several bugs fixed...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									2295c715e6
								
							
						
					
					
						commit
						e1ddf12e7c
					
				| @ -44,7 +44,9 @@ function(force, callback){ | |||||||
| var updateImagePosition = | var updateImagePosition = | ||||||
| module.updateImagePosition = | module.updateImagePosition = | ||||||
| function updateImagePosition(actions, target){ | function updateImagePosition(actions, target){ | ||||||
| 	if(actions.ribbons.getRibbonSet().length == 0){ | 	var s = actions.ribbons.getRibbonSet() | ||||||
|  | 
 | ||||||
|  | 	if(s.length == 0){ | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| @ -57,7 +59,7 @@ function updateImagePosition(actions, target){ | |||||||
| 	var source_order = actions.data.getImageOrder(target) | 	var source_order = actions.data.getImageOrder(target) | ||||||
| 
 | 
 | ||||||
| 	return function(){ | 	return function(){ | ||||||
| 		actions.ribbons.preventTransitions() | 		actions.ribbons.preventTransitions(s) | ||||||
| 
 | 
 | ||||||
| 		// XXX hack...
 | 		// XXX hack...
 | ||||||
| 		if(target.constructor === Array){ | 		if(target.constructor === Array){ | ||||||
| @ -102,7 +104,10 @@ function updateImagePosition(actions, target){ | |||||||
| 
 | 
 | ||||||
| 		actions.focusImage() | 		actions.focusImage() | ||||||
| 
 | 
 | ||||||
| 		actions.ribbons.restoreTransitions(true) | 		// XXX not sure why this does not work without a setTimeout(..)
 | ||||||
|  | 		//actions.ribbons.restoreTransitions(s, true)
 | ||||||
|  | 		setTimeout(function(){  | ||||||
|  | 			actions.ribbons.restoreTransitions(s, true) }, 0) | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -366,10 +366,10 @@ var RibbonsPrototype = { | |||||||
| 		// handle nesting...
 | 		// handle nesting...
 | ||||||
| 		var l = t.getAttribute('__prevent_transitions') | 		var l = t.getAttribute('__prevent_transitions') | ||||||
| 		if(l != null){ | 		if(l != null){ | ||||||
| 			t.getAttribute('__prevent_transitions', l+1) | 			t.setAttribute('__prevent_transitions', parseInt(l)+1) | ||||||
| 			return this | 			return this | ||||||
| 		} | 		} | ||||||
| 		t.getAttribute('__prevent_transitions', 0) | 		t.setAttribute('__prevent_transitions', 0) | ||||||
| 
 | 
 | ||||||
| 		target.addClass('no-transitions') | 		target.addClass('no-transitions') | ||||||
| 
 | 
 | ||||||
| @ -428,7 +428,7 @@ var RibbonsPrototype = { | |||||||
| 			// handle nesting...
 | 			// handle nesting...
 | ||||||
| 			var l = t.getAttribute('__prevent_transitions') | 			var l = t.getAttribute('__prevent_transitions') | ||||||
| 			if(l != null && !force && l != '0'){ | 			if(l != null && !force && l != '0'){ | ||||||
| 				t.getAttribute('__prevent_transitions', l-1) | 				t.setAttribute('__prevent_transitions', parseInt(l)-1) | ||||||
| 				return this | 				return this | ||||||
| 			} | 			} | ||||||
| 			t.removeAttribute('__prevent_transitions') | 			t.removeAttribute('__prevent_transitions') | ||||||
| @ -449,7 +449,7 @@ var RibbonsPrototype = { | |||||||
| 				// handle nesting...
 | 				// handle nesting...
 | ||||||
| 				var l = t.getAttribute('__prevent_transitions') | 				var l = t.getAttribute('__prevent_transitions') | ||||||
| 				if(l != null && !force && l != '0'){ | 				if(l != null && !force && l != '0'){ | ||||||
| 					t.getAttribute('__prevent_transitions', l-1) | 					t.setAttribute('__prevent_transitions', l-1) | ||||||
| 					return this | 					return this | ||||||
| 				} | 				} | ||||||
| 				t.removeAttribute('__prevent_transitions') | 				t.removeAttribute('__prevent_transitions') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user