JustCarmen / webtrees-fancy-imagebar

Fancy Imagebar module for webtrees
http://justcarmen.nl
GNU General Public License v3.0
12 stars 6 forks source link

Synchronisation of map coordinates on my tablet / phone #135

Closed tronsmit closed 5 days ago

tronsmit commented 8 months ago

Even though mapcoords() is called immediately from the script of this module it never sets the data-coords attribute of the area elements, when the page first loaded. Since my width is small the img height is scaled but the map coordinates are not synced to the smaller image size.

If I rotate the device (after the page has been displayed) and trigger a window resize, then data-coords gets set and the sync is working. It seems that when a new page is loaded, invoking mapcoords() before the map is available causes this behaviour.