diff --git a/core/templates/core/project_detail.html b/core/templates/core/project_detail.html index 958f0fd..f7f3fa1 100644 --- a/core/templates/core/project_detail.html +++ b/core/templates/core/project_detail.html @@ -17,6 +17,7 @@
Interactive Mind Map
+
{% csrf_token %} @@ -213,6 +214,18 @@ network.fit({ animation: { duration: 1000, easingFunction: 'easeInOutQuad' } }); } + // Export Map function + function exportMap() { + const canvas = document.querySelector('canvas'); + if (!canvas) return; + + const image = canvas.toDataURL("image/png"); + const link = document.createElement('a'); + link.download = 'mindmap.png'; + link.href = image; + link.click(); + } + // Handle clicks to show details in the sidebar network.on("click", function (params) { const detailsPanel = document.getElementById('node-details');