mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 20:10:13 +00:00 
			
		
		
		
	added zooming in editor mode (to counter CKEdtor's toolbar placement issues when editing un-margined pages)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									51d1270f2f
								
							
						
					
					
						commit
						bcc490ab8d
					
				
							
								
								
									
										4
									
								
								TODO.otl
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								TODO.otl
									
									
									
									
									
								
							| @ -3,8 +3,8 @@ | |||||||
| 		[_] 0% Priority work for 10.03.13 | 		[_] 0% Priority work for 10.03.13 | ||||||
| 			[_] change image | 			[_] change image | ||||||
| 			[_] add page via template | 			[_] add page via template | ||||||
| 			[_] load/save state | 			[_] load/save state (migrate) | ||||||
| 			[_] load/save from JSON | 			[_] load/save from JSON (migrate) | ||||||
| 			[_] basic instructions/docs... | 			[_] basic instructions/docs... | ||||||
| 			[_] page settngs in full view editor | 			[_] page settngs in full view editor | ||||||
| 			| could even be fixed... | 			| could even be fixed... | ||||||
|  | |||||||
| @ -359,6 +359,9 @@ var toggleInlineEditor = createCSSClassToggler( | |||||||
| 		} | 		} | ||||||
| 	}) | 	}) | ||||||
| 	 | 	 | ||||||
|  | var toggleInlineEditorMode = createCSSClassToggler('.chrome', 'inline-editor-mode') | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // this will set up the main editor event handlers and data...
 | // this will set up the main editor event handlers and data...
 | ||||||
|  | |||||||
							
								
								
									
										35
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								index.html
									
									
									
									
									
								
							| @ -153,6 +153,41 @@ var keyboard_config = { | |||||||
| 			}, | 			}, | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
|  | 	'.editor:not(.inline-editor-mode)': { | ||||||
|  | 		title: 'Editor mode.', | ||||||
|  | 		doc: '', | ||||||
|  | 
 | ||||||
|  | 		// 0 | ||||||
|  | 		48: function(){ | ||||||
|  | 				var n = getPageNumber() | ||||||
|  | 				if(togglePageView('?') == 'on'){ | ||||||
|  | 					setMagazineScale(getPageTargetScale(1)) | ||||||
|  | 				} else { | ||||||
|  | 					setMagazineScale(getPageTargetScale(PAGES_IN_RIBBON)) | ||||||
|  | 				} | ||||||
|  | 				setCurrentPage(n) | ||||||
|  | 			}, | ||||||
|  | 		Esc: 48, | ||||||
|  | 
 | ||||||
|  | 		// + | ||||||
|  | 		187: function(){ | ||||||
|  | 				var n = getPageNumber() | ||||||
|  | 				setMagazineScale(Math.min( | ||||||
|  | 						getMagazineScale() * 1.2,  | ||||||
|  | 						getPageTargetScale(1))) | ||||||
|  | 				setCurrentPage(n) | ||||||
|  | 			}, | ||||||
|  | 		// - | ||||||
|  | 		189: function(){ | ||||||
|  | 				var n = getPageNumber() | ||||||
|  | 				setMagazineScale(Math.max( | ||||||
|  | 						getMagazineScale() * 0.8,  | ||||||
|  | 						getPageTargetScale(PAGES_IN_RIBBON*2))) | ||||||
|  | 				setCurrentPage(n) | ||||||
|  | 			}, | ||||||
|  | 
 | ||||||
|  | 	}, | ||||||
|  | 
 | ||||||
| 	// ignore all keys except Esc here... | 	// ignore all keys except Esc here... | ||||||
| 	'.inline-editor-mode': { | 	'.inline-editor-mode': { | ||||||
| 		title: 'Inline editor mode.', | 		title: 'Inline editor mode.', | ||||||
|  | |||||||
| @ -76,9 +76,6 @@ var togglePageView = createCSSClassToggler( | |||||||
| 		}) | 		}) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| var toggleInlineEditorMode = createCSSClassToggler('.chrome', 'inline-editor-mode') |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| // XXX this is neither final nor usable...
 | // XXX this is neither final nor usable...
 | ||||||
| function prepareInlineCaptions(){ | function prepareInlineCaptions(){ | ||||||
| 	$('.page img[title]').each(function(){ | 	$('.page img[title]').each(function(){ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user