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:
hunicus
2022-03-14 14:33:41 -04:00
parent 4c8ac3a585
commit 5a58ce0ab3
3 changed files with 10 additions and 10 deletions

View File

@@ -77,9 +77,9 @@ export class ApiDocsComponent implements OnInit {
}
this.openEndpointContainer( targetId );
}
openEndpointContainer( targetId ) {
if( window.innerWidth <= 992 ) {
if( ( window.innerWidth <= 992 ) && this.restTabActivated && targetId ) {
const endpointContainerEl = document.querySelector<HTMLElement>( "#" + targetId );
const endpointContentEl = document.querySelector<HTMLElement>( "#" + targetId + " .endpoint-content" );
const endPointContentElHeight = endpointContentEl.clientHeight;
@@ -95,7 +95,7 @@ export class ApiDocsComponent implements OnInit {
endpointContentEl.style.opacity = "1";
endpointContentEl.classList.add( "open" );
}
}
}
}
wrapUrl(network: string, code: any, websocket: boolean = false) {