Fix loose ends
Add space above footer, add better delay for height adjustment, and add conditions to prevent errors for websocket endpoint and no endpoint.
This commit is contained in:
		
							parent
							
								
									4c8ac3a585
								
							
						
					
					
						commit
						5a58ce0ab3
					
				| @ -188,6 +188,7 @@ h3 { | |||||||
|   .doc-content { |   .doc-content { | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     margin-top: -20px; |     margin-top: -20px; | ||||||
|  |     float: unset; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   .endpoint-container { |   .endpoint-container { | ||||||
| @ -230,5 +231,4 @@ h3 { | |||||||
|   h3 { |   h3 { | ||||||
|     display: none; |     display: none; | ||||||
|   } |   } | ||||||
|    |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -79,7 +79,7 @@ export class ApiDocsComponent implements OnInit { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   openEndpointContainer( targetId ) { |   openEndpointContainer( targetId ) { | ||||||
|     if( window.innerWidth <= 992 ) { |     if( ( window.innerWidth <= 992 ) && this.restTabActivated && targetId ) { | ||||||
|       const endpointContainerEl = document.querySelector<HTMLElement>( "#" + targetId ); |       const endpointContainerEl = document.querySelector<HTMLElement>( "#" + targetId ); | ||||||
|       const endpointContentEl = document.querySelector<HTMLElement>( "#" + targetId + " .endpoint-content" ); |       const endpointContentEl = document.querySelector<HTMLElement>( "#" + targetId + " .endpoint-content" ); | ||||||
|       const endPointContentElHeight = endpointContentEl.clientHeight; |       const endPointContentElHeight = endpointContentEl.clientHeight; | ||||||
|  | |||||||
| @ -23,13 +23,13 @@ export class CodeTemplateComponent implements OnInit { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   adjustContainerHeight( event ) { |   adjustContainerHeight( event ) { | ||||||
|     if( window.innerWidth <= 992 ) { |     if( ( window.innerWidth <= 992 ) && ( this.method !== "websocket" ) ) { | ||||||
|       const urlObj = new URL( window.location + "" ); |       const urlObj = new URL( window.location + "" ); | ||||||
|       const endpointContainerEl = document.querySelector<HTMLElement>( urlObj.hash ); |       const endpointContainerEl = document.querySelector<HTMLElement>( urlObj.hash ); | ||||||
|       const endpointContentEl = document.querySelector<HTMLElement>( urlObj.hash + " .endpoint-content" ); |       const endpointContentEl = document.querySelector<HTMLElement>( urlObj.hash + " .endpoint-content" ); | ||||||
|       window.setTimeout( function() { |       window.setTimeout( function() { | ||||||
|         endpointContainerEl.style.height = endpointContentEl.clientHeight + 90 + "px"; |         endpointContainerEl.style.height = endpointContentEl.clientHeight + 90 + "px"; | ||||||
|       }, 400); |       }, 550); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user