Skip to content

Commit 67b3145

Browse files
committed
Breakfix version to stop the height offsets failing
1 parent b1f29dc commit 67b3145

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

module.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "popout",
33
"title": "PopOut!",
44
"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>",
5-
"version": "2.15",
5+
"version": "2.16",
66
"author": "KaKaRoTo, Posnet",
77
"authors": [{ "name": "KaKaRoTo" }, { "name": "Posnet" }],
88
"scripts": ["./popout.js"],
@@ -47,7 +47,7 @@
4747
"readme": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout#readme",
4848
"url": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout",
4949
"manifest": "https://raw.githubusercontent.com/League-of-Foundry-Developers/fvtt-module-popout/master/module.json",
50-
"download": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout/archive/v2.15.zip",
50+
"download": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout/archive/v2.16.zip",
5151
"bugs": "https://github.com/League-of-Foundry-Developers/fvtt-module-popout/issues",
5252
"compatibility": {
5353
"minimum": "10",

popout.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -836,10 +836,21 @@ window.tooltip_manager = new TooltipManager();
836836
offsets.width = `calc(100% - ${bounding.width - width}px)`;
837837
width = bounding.width;
838838
}
839-
if (bounding.height > height) {
840-
offsets.height = `calc(100% - ${bounding.height - height}px)`;
841-
height = bounding.height;
842-
}
839+
// BREAKFIX(posnet: 2024-02-18)
840+
// If an element has overflow: hidden set, this breaks the
841+
// bounding box algo since it can end up with a bounding height
842+
// larget than the window. I thought that changing the Infinity
843+
// values in the recursiveBoundingBox function would fix this,
844+
// however it it also fails in different ways. For the moment
845+
// I'm going to make a break/fix release to remove the height
846+
// calc because as far as a know the only side elements in pathfinder
847+
// or foundry are the ones overflowing. So we'll just set height
848+
// to the the default value for now.
849+
// if (bounding.height > height) {
850+
// offsets.height = `calc(100% - ${bounding.height - height}px)`;
851+
// height = bounding.height;
852+
// }
853+
// BREAKFIX
843854
}
844855

845856
const padding = 30;

0 commit comments

Comments
 (0)