davidjbradshaw / image-map-resizer

Responsive HTML Image Maps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Works if image starts at native size, but not smaller

mickfollari opened this issue · comments

If this site starts at full browser size and I resize it, the map correctly resizes with the image. But if I hit refresh while it's smaller, the map just loads at the full size and doesn't match up at all. Any ideas?
edit: more information... the image is part of content that is display: none on page load. When I resize it slightly, it correctly resizes the map. So it's just on initial load, and activating tab of content, it's not working.

I found a workaround by triggering $(window).resize() when the tab is clicked (the one that would expose the image in question).

What event are you using to detect the tab being clicked?

On Friday, 12 August 2016, mickfollari notifications@github.com wrote:

I found a workaround by triggering $(window).resize() when the tab is
clicked (the one that would expose the image in question).


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#44 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAkHEhe9KGpDdH33yyYQdBCyo6IMFAsKks5qfLrBgaJpZM4JjT_Y
.

Sent from my iPhone.