mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	change to relation map note type doesn't trigger content change, related issue #258
This commit is contained in:
		
							parent
							
								
									f7a670ec24
								
							
						
					
					
						commit
						a608832681
					
				@ -80,7 +80,16 @@ const linkOverlays = [
 | 
				
			|||||||
function loadMapData() {
 | 
					function loadMapData() {
 | 
				
			||||||
    const currentNote = noteDetailService.getCurrentNote();
 | 
					    const currentNote = noteDetailService.getCurrentNote();
 | 
				
			||||||
    mapData = {
 | 
					    mapData = {
 | 
				
			||||||
        notes: []
 | 
					        notes: [],
 | 
				
			||||||
 | 
					        // it is important to have this exact value here so that initial transform is same as this
 | 
				
			||||||
 | 
					        // which will guarantee note won't be saved on first conversion to relation map note type
 | 
				
			||||||
 | 
					        // this keeps the principle that note type change doesn't destroy note content unless user
 | 
				
			||||||
 | 
					        // does some actual change
 | 
				
			||||||
 | 
					        transform: {
 | 
				
			||||||
 | 
					            x: 0,
 | 
				
			||||||
 | 
					            y: 0,
 | 
				
			||||||
 | 
					            scale: 1
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (currentNote.content) {
 | 
					    if (currentNote.content) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user