mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 18:52:18 +08:00 
			
		
		
		
	
							parent
							
								
									a41a5b3ad4
								
							
						
					
					
						commit
						3b30d89956
					
				@ -110,10 +110,16 @@ const getMiddleTop = (node: MNode, parentNode: MNode, stage: StageCore | null) =
 | 
			
		||||
 | 
			
		||||
export const getInitPositionStyle = (style: Record<string, any> = {}, layout: Layout) => {
 | 
			
		||||
  if (layout === Layout.ABSOLUTE) {
 | 
			
		||||
    return {
 | 
			
		||||
    const newStyle: Record<string, any> = {
 | 
			
		||||
      ...style,
 | 
			
		||||
      position: 'absolute',
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    if (typeof newStyle.left === 'undefined' && typeof newStyle.right === 'undefined') {
 | 
			
		||||
      newStyle.left = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return newStyle;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (layout === Layout.RELATIVE) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user