|
|
|
@@ -110,7 +110,9 @@ function updateEntityElement(entity, element, zIndex) { |
|
|
|
element.style.left = position.x + "px"; |
|
|
|
element.style.top = position.y + "px"; |
|
|
|
const pixels = math.divide(entity.views[view].height, config.height) * (canvasHeight - 50); |
|
|
|
const bonus = (entity.views[view].image.extra ? entity.views[view].image.extra : 1); |
|
|
|
const extra = entity.views[view].image.extra; |
|
|
|
const bottom = entity.views[view].image.bottom; |
|
|
|
const bonus = (extra ? extra : 1) * (1 / (1 - (bottom ? bottom : 0))); |
|
|
|
element.style.setProperty("--height", pixels * bonus + "px"); |
|
|
|
element.style.setProperty("--extra", pixels * bonus - pixels + "px"); |
|
|
|
|
|
|
|
@@ -1382,10 +1384,8 @@ function fitWorld(manual=false, factor=1.1) { |
|
|
|
|
|
|
|
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"))); |
|
|
|
max = fitMode.binop(max, math.multiply(extra, entity.views[view].height.toNumber("meter"))); |
|
|
|
count += 1; |
|
|
|
}); |
|
|
|
|
|
|
|
|