From 31e6fc3caf45f7ed0127676a6503ced652059435 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Tue, 3 Mar 2020 08:08:34 -0500 Subject: [PATCH] Fix entities with extra height getting cut off when fitting the world --- macrovision.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/macrovision.js b/macrovision.js index d8e5447b..704b6972 100644 --- a/macrovision.js +++ b/macrovision.js @@ -1343,7 +1343,12 @@ function fitWorld() { Object.entries(entities).forEach(([key, entity]) => { const view = entity.view; - max = fitMode.binop(max, entity.views[view].height.toNumber("meter")); + let extra = entity.views[view].image.extra; + extra = extra === undefined ? 1 : extra; + let bottom = entity.views[view].image.bottom; + bottom = bottom === undefined ? 0 : bottom; + + max = fitMode.binop(max, math.multiply(extra * (1 - bottom), entity.views[view].height.toNumber("meter"))); count += 1; });