Skip to content

Commit

Permalink
Breakfix version to stop the height offsets failing
Browse files Browse the repository at this point in the history
  • Loading branch information
Posnet committed Feb 17, 2024
1 parent b1f29dc commit 67b3145
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "popout",
"title": "PopOut!",
"description": "<p>This module adds a PopOut! button to most actor sheets, journal entries, and applications.</p><p>The PopOut! button allows you to open a sheet/application/document into its own window, for easier viewing or for use with multiple monitors.</p>",
"version": "2.15",
"version": "2.16",
"author": "KaKaRoTo, Posnet",
"authors": [{ "name": "KaKaRoTo" }, { "name": "Posnet" }],
"scripts": ["./popout.js"],
Expand Down Expand Up @@ -47,7 +47,7 @@
"readme": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout#readme",
"url": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout",
"manifest": "https://raw.githubusercontent.com/League-of-Foundry-Developers/fvtt-module-popout/master/module.json",
"download": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout/archive/v2.15.zip",
"download": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout/archive/v2.16.zip",
"bugs": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout/issues",
"compatibility": {
"minimum": "10",
Expand Down
19 changes: 15 additions & 4 deletions popout.js
Original file line number Diff line number Diff line change
Expand Up @@ -836,10 +836,21 @@ window.tooltip_manager = new TooltipManager();
offsets.width = `calc(100% - ${bounding.width - width}px)`;
width = bounding.width;
}
if (bounding.height > height) {
offsets.height = `calc(100% - ${bounding.height - height}px)`;
height = bounding.height;
}
// BREAKFIX(posnet: 2024-02-18)
// If an element has overflow: hidden set, this breaks the
// bounding box algo since it can end up with a bounding height
// larget than the window. I thought that changing the Infinity
// values in the recursiveBoundingBox function would fix this,
// however it it also fails in different ways. For the moment
// I'm going to make a break/fix release to remove the height
// calc because as far as a know the only side elements in pathfinder
// or foundry are the ones overflowing. So we'll just set height
// to the the default value for now.
// if (bounding.height > height) {
// offsets.height = `calc(100% - ${bounding.height - height}px)`;
// height = bounding.height;
// }
// BREAKFIX
}

const padding = 30;
Expand Down

0 comments on commit 67b3145

Please sign in to comment.