summaryrefslogtreecommitdiff
path: root/src/graph.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-10-12 14:07:50 +0200
committerJules Laplace <julescarbon@gmail.com>2021-10-12 14:07:50 +0200
commit311e9fcb98bdb5360b30f9c1ca1728ddd5a9b274 (patch)
tree3a37ab02e27b0963542db253bd3144ad6c6b3cc5 /src/graph.js
parent0335bcf36c2663bc93922437ea88dff00b24a6ed (diff)
css adjustment. landscape warning. fixing resize
Diffstat (limited to 'src/graph.js')
-rw-r--r--src/graph.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/graph.js b/src/graph.js
index 75491b3..db06a62 100644
--- a/src/graph.js
+++ b/src/graph.js
@@ -299,6 +299,8 @@ export default function buildGraph({ db, handlers }) {
};
const resize = () => {
+ graph.width(window.innerWidth);
+ graph.height(window.innerHeight);
graph.renderer().setSize(window.innerWidth, window.innerHeight);
graph.camera().aspect = window.innerWidth / window.innerHeight;
graph.camera().updateProjectionMatrix();