summaryrefslogtreecommitdiff
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
parent0335bcf36c2663bc93922437ea88dff00b24a6ed (diff)
css adjustment. landscape warning. fixing resize
-rw-r--r--public/assets/css/css.css2
-rw-r--r--src/graph.js2
-rw-r--r--src/views/LandscapeWarning.js7
3 files changed, 7 insertions, 4 deletions
diff --git a/public/assets/css/css.css b/public/assets/css/css.css
index cc7151d..d5df5ae 100644
--- a/public/assets/css/css.css
+++ b/public/assets/css/css.css
@@ -21,6 +21,7 @@ a {
line-height: 1.5;
font-family: "Spectral", serif !important;
opacity: 1;
+ user-select: none;
}
.scene-tooltip:empty {
opacity: 0;
@@ -185,6 +186,7 @@ a {
.detail .content {
overflow-x: hidden;
overflow-y: scroll;
+ scrollbar-width: none;
}
.detail .content::-webkit-scrollbar {
width: 0;
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();
diff --git a/src/views/LandscapeWarning.js b/src/views/LandscapeWarning.js
index 389e8a6..1c8e61c 100644
--- a/src/views/LandscapeWarning.js
+++ b/src/views/LandscapeWarning.js
@@ -27,12 +27,11 @@ const RotateIcon = (
);
export default class LandscapeWarning extends Component {
- state = {
- landscape: !isMobile || window.innerWidth > window.innerHeight,
- };
-
constructor(props) {
super(props);
+ this.state = {
+ landscape: !isMobile || window.innerWidth > window.innerHeight,
+ };
this.handleResize = this.handleResize.bind(this);
if (isMobile) {
window.addEventListener("resize", this.handleResize);