(showDocs)
| 755 | desiredDocsHeight = 300; |
| 756 | |
| 757 | function resize(showDocs) { |
| 758 | var docsHeight = 0, |
| 759 | graphHeight, |
| 760 | $docs = $('#docs-container'), |
| 761 | $graphCtnr = $('#graph-container'), |
| 762 | $graphBox = $('#graph'), |
| 763 | $graphSVG = $('#graph-svg'), |
| 764 | $close = $('#docs-close'); |
| 765 | |
| 766 | if (typeof showDocs == 'boolean') { |
| 767 | showingDocs = showDocs; |
| 768 | $docs[showDocs ? 'show' : 'hide'](); |
| 769 | } |
| 770 | |
| 771 | if (showingDocs) { |
| 772 | docsHeight = desiredDocsHeight; |
| 773 | $docs.css('height', docsHeight + 'px'); |
| 774 | } |
| 775 | |
| 776 | let graphElement = document.getElementById('graph'); |
| 777 | |
| 778 | graphHeight = window.innerHeight - docsHeight; |
| 779 | $graphBox.css('height', graphHeight + 'px'); |
| 780 | $graphSVG.css('width', graphElement.clientWidth + 'px'); |
| 781 | $graphSVG.css('height', graphElement.clientHeight + 'px'); |
| 782 | $graphCtnr.css('height', graphHeight + 'px'); |
| 783 | |
| 784 | if (graph.simulation) { |
| 785 | graph.simulation.force("center", d3.forceCenter(graphElement.clientWidth / 2, graphElement.clientHeight / 2)); |
| 786 | } |
| 787 | |
| 788 | $close.css({ |
| 789 | top: graphHeight + docsClosePadding + 'px', |
| 790 | right: window.innerWidth - $docs[0].clientWidth + docsClosePadding + 'px' |
| 791 | }); |
| 792 | } |
| 793 | |
| 794 | /* eslint-disable-next-line no-unused-vars */ |
| 795 | function doZoom(event, obj) { |
no outgoing calls
no test coverage detected