From 967df6afd5b09c024019fa85ba42ae9a07e13680 Mon Sep 17 00:00:00 2001 From: Matthias Konitzny <konitzny@ibr.cs.tu-bs.de> Date: Wed, 2 Mar 2022 14:38:50 +0100 Subject: [PATCH] Fixed fullscreen mode for Safari browsers. --- display/graph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/display/graph.js b/display/graph.js index 339d155..dbde29b 100644 --- a/display/graph.js +++ b/display/graph.js @@ -4,6 +4,7 @@ import { loadGraphJson } from "../datasets/datasets"; import * as THREE from "three"; import ForceGraph3D from "3d-force-graph"; +import screenfull from "screenfull"; import { CSS3DRenderer, @@ -362,7 +363,7 @@ export default class Graph { } resize() { - if (document.fullscreenElement == Helpers.getCanvasDivNode()) { + if (screenfull.isEnabled) { this.graph.height(screen.height); this.graph.width(screen.width); } else { -- GitLab