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