mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-11-04 05:10:07 +00:00 
			
		
		
		
	removed cropped-mode CSS class to avoid sync errors and moved to isViewCropped() in checks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									6d80a86ab2
								
							
						
					
					
						commit
						a88de5403c
					
				@ -1647,14 +1647,17 @@ function showAllData(){
 | 
				
			|||||||
//
 | 
					//
 | 
				
			||||||
// NOTE: This will add the toggler to CROP_MODES, for use by 
 | 
					// NOTE: This will add the toggler to CROP_MODES, for use by 
 | 
				
			||||||
// 		uncropLastState(...)
 | 
					// 		uncropLastState(...)
 | 
				
			||||||
 | 
					// NOTE: crop modes are exclusive -- it is not possible to enter one crop
 | 
				
			||||||
 | 
					// 		mode from a different crop mode
 | 
				
			||||||
function makeCropModeToggler(cls, crop){
 | 
					function makeCropModeToggler(cls, crop){
 | 
				
			||||||
	var res = createCSSClassToggler(
 | 
						var res = createCSSClassToggler(
 | 
				
			||||||
			'.viewer',
 | 
								'.viewer',
 | 
				
			||||||
			cls + ' cropped-mode',
 | 
								//cls + ' cropped-mode',
 | 
				
			||||||
 | 
								cls,
 | 
				
			||||||
			function(action){
 | 
								function(action){
 | 
				
			||||||
				// prevent mixing marked-only and single-ribbon modes...
 | 
									// prevent mixing marked-only and single-ribbon modes...
 | 
				
			||||||
				if(action == 'on' 
 | 
									if(action == 'on' 
 | 
				
			||||||
						&& $('.viewer').hasClass('cropped-mode') 
 | 
											&& isViewCropped()
 | 
				
			||||||
						&& res('?') != 'on'){
 | 
											&& res('?') != 'on'){
 | 
				
			||||||
					return false
 | 
										return false
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
@ -1679,7 +1682,7 @@ function makeCropModeToggler(cls, crop){
 | 
				
			|||||||
// NOTE: this will exit all crop modes when uncropping the last step.
 | 
					// NOTE: this will exit all crop modes when uncropping the last step.
 | 
				
			||||||
function uncropLastState(){
 | 
					function uncropLastState(){
 | 
				
			||||||
	// do nothing if we aren't in a crop mode...
 | 
						// do nothing if we aren't in a crop mode...
 | 
				
			||||||
	if(!$('.viewer').hasClass('cropped-mode')){
 | 
						if(!isViewCropped()){
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user