Responsive image map

If I’m reading the instructions correctly, for SugarCube/Twine you could simply copy the above code to your JavaScript section, and then just add this:

$(document).on(":passagedisplay", function (event) {
	$('map').imageMapResize();
});

That should work, though I didn’t look at the code enough to determine if calling it repeatedly would cause any problems. If you start to experience greater and greater slowdown every passage you go to, then the code may need to be modified to handle repeated calls. I wouldn’t worry about that too much unless you notice it happening, though.

Hope that helps! :slight_smile:

1 Like