Skip to content

Instantly share code, notes, and snippets.

@davidmcclure
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidmcclure/9904089 to your computer and use it in GitHub Desktop.
Save davidmcclure/9904089 to your computer and use it in GitHub Desktop.
Creating themes for individual Neatline exhibits
Neatline.on('start', function() {
var narrative = $('div.narrative');
var exhibit = $('div.exhibit');
var bubble = $('div.bubble');
// Cache the width of the narrative.
var textWidth = narrative.outerWidth();
var position = function() {
var width = $(window).width();
// Fill width with exhibit.
exhibit.outerWidth(width + textWidth);
// Fill height with content.
exhibit.add(narrative).outerHeight($(window).height());
// Refresh OpenLayers.
Neatline.execute('MAP:updateSize');
};
$(window).resize(position);
position();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment