MCPcopy Create free account
hub / github.com/adobe/Marinus / resize

Function resize

web_server/public/javascripts/cert_graph.js:767–802  ·  view source on GitHub ↗
(showDocs)

Source from the content-addressed store, hash-verified

765 desiredDocsHeight = 180;
766
767function 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 */
805function doZoom(event, obj) {

Callers 3

cert_graph.jsFile · 0.70
selectObjectFunction · 0.70
deselectObjectFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected