diff --git a/assets/pasted-20260313-122618-10540224.png b/assets/pasted-20260313-122618-10540224.png new file mode 100644 index 0000000..51e8fb5 Binary files /dev/null and b/assets/pasted-20260313-122618-10540224.png differ diff --git a/core/templates/core/project_detail.html b/core/templates/core/project_detail.html index 341b344..46a1edd 100644 --- a/core/templates/core/project_detail.html +++ b/core/templates/core/project_detail.html @@ -239,7 +239,42 @@ const network = new vis.Network(container, data, options); - function fitNetwork() { + + // Change Layout function + function changeLayout(value) { + if (value === 'hierarchical') { + network.setOptions({ + layout: { + improvedLayout: true, + hierarchical: { + direction: 'UD', + sortMethod: 'directed' + } + } + }); + } else { + network.setOptions({ + layout: { + improvedLayout: true, + hierarchical: false + } + }); + } + } + + // Zoom In function + function zoomIn() { + var scale = network.getScale(); + network.moveTo({ scale: scale * 1.5 }); + } + + // Zoom Out function + function zoomOut() { + var scale = network.getScale(); + network.moveTo({ scale: scale / 1.5 }); + } + +function fitNetwork() { network.fit({ animation: { duration: 1000, easingFunction: 'easeInOutQuad' } }); }