Mercurial > hg > batmud > maputils
changeset 2380:4876ffa21bc0
Fix an onload problem.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 04 Nov 2021 05:17:11 +0200 |
parents | aa727f279c3a |
children | d0262696140f |
files | src/util.js |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/util.js Thu Nov 04 05:16:40 2021 +0200 +++ b/src/util.js Thu Nov 04 05:17:11 2021 +0200 @@ -238,9 +238,13 @@ var nelem = document.getElementById(eid); if (nelem) { - mapSetPosToElem(nelem); - mapSetActiveLocation(eid); - mapCurrLoc = eid; + setTimeout(function() + { + mapSetPosToElem(nelem); + mapSetActiveLocation(eid); + mapCurrLoc = eid; + }, + 50); } }