summaryrefslogtreecommitdiff
path: root/src/graph.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-09-27 16:40:11 +0200
committerJules Laplace <julescarbon@gmail.com>2021-09-27 16:40:11 +0200
commit3bb9ce022cff85e399d33ea0f61f9bd20889f0f0 (patch)
tree65ad3d276341ab1dbce536335ec33039a420391e /src/graph.js
parent792e9b07ee13d1e5c9adc641f731b0866bbc0987 (diff)
new logos. fix resize
Diffstat (limited to 'src/graph.js')
-rw-r--r--src/graph.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/graph.js b/src/graph.js
index dfe608a..c4d7765 100644
--- a/src/graph.js
+++ b/src/graph.js
@@ -289,6 +289,12 @@ export default function buildGraph({ db, handlers }) {
graph.d3Force("charge").strength(-100);
+ window.addEventListener("resize", function () {
+ graph.renderer().setSize(window.innerWidth, window.innerHeight);
+ graph.camera().aspect = window.innerWidth / window.innerHeight;
+ graph.camera().updateProjectionMatrix();
+ });
+
// camera orbit
initialZoom();