From 8c9d2d7807d5c6e5c452cae3f215f9d8fc636c1e Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sat, 14 Mar 2020 11:04:18 -0400 Subject: [PATCH] Make height bars go behind entities. Fix bars not appearing for freshly-added entities This also probably fixes bugs with wrong z-indexing for fresh entities --- macrovision.css | 1 + macrovision.js | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/macrovision.css b/macrovision.css index 51fb3b7c..3611f3e8 100644 --- a/macrovision.css +++ b/macrovision.css @@ -468,6 +468,7 @@ body.toggle-height-bars .height-bar { top: calc(-100% + var(--extra)); left: calc(-1 * var(--xpos)); transition: 0s all; + z-index: -1; } .height-bar::before { diff --git a/macrovision.js b/macrovision.js index 6201b373..813c91ff 100644 --- a/macrovision.js +++ b/macrovision.js @@ -916,9 +916,6 @@ function displayEntity(entity, view, x, y, selectEntity=false) { world.appendChild(bottomName); entityIndex += 1; - - updateEntityElement(entity, box); - if (config.autoFit) { fitWorld(); } @@ -926,7 +923,9 @@ function displayEntity(entity, view, x, y, selectEntity=false) { if (selectEntity) select(box); - entity.dirty = false; + entity.dirty = true; + + updateSizes(true); }