Skip to content

Commit

Permalink
fix effect menu on 125p display
Browse files Browse the repository at this point in the history
  • Loading branch information
Durtur committed Dec 20, 2021
1 parent 649f031 commit 96ef068
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/css/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
.sidebar_section {
padding: 1.25em;
/* flex: 1; */
height: 13em;

justify-content: space-around;
}

Expand All @@ -47,6 +47,7 @@

.sidebar>.column {
width: 100%;
overflow-y:auto;
}

.sidebar h2, .sidebar h1 {
Expand Down
6 changes: 4 additions & 2 deletions app/mappingTool/lightning.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 96ef068

Please sign in to comment.