From 96ef0684ba1dfdac3c5e4514a3aece2d2d108d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=ADmon?= Date: Mon, 20 Dec 2021 21:05:13 +0000 Subject: [PATCH] fix effect menu on 125p display --- app/css/sidebar.css | 3 ++- app/mappingTool/lightning.js | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/css/sidebar.css b/app/css/sidebar.css index 2bd4abc..c33a511 100644 --- a/app/css/sidebar.css +++ b/app/css/sidebar.css @@ -35,7 +35,7 @@ .sidebar_section { padding: 1.25em; /* flex: 1; */ - height: 13em; + justify-content: space-around; } @@ -47,6 +47,7 @@ .sidebar>.column { width: 100%; + overflow-y:auto; } .sidebar h2, .sidebar h1 { diff --git a/app/mappingTool/lightning.js b/app/mappingTool/lightning.js index 149dfa7..1b957d2 100644 --- a/app/mappingTool/lightning.js +++ b/app/mappingTool/lightning.js @@ -166,12 +166,14 @@ var fovLighting = function () { var totalRadius = pawn.sight_radius_brigth_pixels + pawn.sight_radius_dim_pixels; var margin = pawn.sight_mode == "darkvision" ? 0 : totalRadius; var rect = pawn.getBoundingClientRect(); - - return ( + var isOffScren = + ( (rect.x + rect.width) < 0 - margin || (rect.y + rect.height) < 0 - margin || (rect.x > window.innerWidth + margin || rect.y > window.innerHeight + margin) ); + if(!isOffScren)console.log("Inside", pawn) + return isOffScren; } function paintVision(currentPawn, pawnX, pawnY) {