withassociates/microfiche.js — pull request #30 by bbakersmith (2014-02-06 22:22:07+00:00)
Title: Add a 'refresh' method for redrawing Microfiche

Specifically useful for updating the Microfiche controls when the page or containing element is resized.

I basically am just storing a copy of the original target DOM element's contents during initialization, so that I can restore them and reinitialize after clearing the existing Microfiche DOM and data elements.

I included an example in the documentation (index.html) page.

What do you think of this approach? Do you think it's enough of a "refresh" to be called "refresh"? And is there a better way of making it callable than $('#my-element').microfiche().data('microfiche').refresh()?

Let me know, happy to further refine if desired.