mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 03:29:02 +01:00 
			
		
		
		
	fixed layouting issues
This commit is contained in:
		
							parent
							
								
									40a32e6826
								
							
						
					
					
						commit
						7ad9f7b129
					
				| @ -13,18 +13,27 @@ let codeEditorInitialized; | |||||||
| async function show() { | async function show() { | ||||||
|     codeEditorInitialized = false; |     codeEditorInitialized = false; | ||||||
| 
 | 
 | ||||||
|  |     // if the note is empty, it doesn't make sense to do render-only since nothing will be rendered
 | ||||||
|  |     if (!noteDetailService.getCurrentNote().content.trim()) { | ||||||
|  |         toggleEdit(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     $noteDetailRender.show(); |     $noteDetailRender.show(); | ||||||
| 
 | 
 | ||||||
|     await render(); |     await render(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $toggleEditButton.click(() => { | async function toggleEdit() { | ||||||
|     if ($noteDetailCode.is(":visible")) { |     if ($noteDetailCode.is(":visible")) { | ||||||
|         $noteDetailCode.hide(); |         $noteDetailCode.hide(); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|         if (!codeEditorInitialized) { |         if (!codeEditorInitialized) { | ||||||
|             noteDetailCodeService.show(); |             await noteDetailCodeService.show(); | ||||||
|  | 
 | ||||||
|  |             // because we can't properly scroll only the editor without scrolling the rendering
 | ||||||
|  |             // we limit its height
 | ||||||
|  |             $noteDetailCode.find('.CodeMirror').css('height', '300'); | ||||||
| 
 | 
 | ||||||
|             codeEditorInitialized = true; |             codeEditorInitialized = true; | ||||||
|         } |         } | ||||||
| @ -32,7 +41,9 @@ $toggleEditButton.click(() => { | |||||||
|             $noteDetailCode.show(); |             $noteDetailCode.show(); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| }); | } | ||||||
|  | 
 | ||||||
|  | $toggleEditButton.click(toggleEdit); | ||||||
| 
 | 
 | ||||||
| $renderButton.click(render); | $renderButton.click(render); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -277,6 +277,7 @@ div.ui-tooltip { | |||||||
| 
 | 
 | ||||||
| #note-detail-code { | #note-detail-code { | ||||||
|     min-height: 200px; |     min-height: 200px; | ||||||
|  |     overflow: auto; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #note-detail-render { | #note-detail-render { | ||||||
| @ -288,6 +289,10 @@ div.ui-tooltip { | |||||||
|     height: auto; |     height: auto; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | .CodeMirror-scroll { | ||||||
|  |     min-height: 200px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| #note-id-display { | #note-id-display { | ||||||
|     position: absolute; |     position: absolute; | ||||||
|     right: 10px; |     right: 10px; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner